Skip to content

[$60]Challenge Details: Eligible events section not displayed #4430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SathyaJayabal opened this issue May 27, 2020 · 28 comments
Closed

[$60]Challenge Details: Eligible events section not displayed #4430

SathyaJayabal opened this issue May 27, 2020 · 28 comments

Comments

@SathyaJayabal
Copy link
Collaborator

V5 URL: https://beta-community-app.topcoder.com/challenges/d9c74629-762f-4464-9753-ebd982c7990f

V4 URL: https://www.topcoder.com/challenges/30106190
Screenshot 2020-05-27 at 4 49 36 PM
Screenshot 2020-05-27 at 4 48 20 PM

@SathyaJayabal
Copy link
Collaborator Author

FYI: This issue was tested on production backend. Please use the given urls to compare
V5 URL: https://beta-community-app.topcoder.com/challenges/d9c74629-762f-4464-9753-ebd982c7990f
V4 URL: https://www.topcoder.com/challenges/30106190

@sushilshinde sushilshinde changed the title Challenge Details: Eligible events section not displayed [$40]Challenge Details: Eligible events section not displayed May 27, 2020
@crazyk07
Copy link

Contest https://www.topcoder.com/challenges/30126891 has been created for this ticket.

This is an automated message for crazyk via Topcoder X

@crazyk07
Copy link

Contest https://www.topcoder.com/challenges/30126891 has been updated - it has been assigned to sr_jr.

This is an automated message for crazyk via Topcoder X

@lakshmiathreya lakshmiathreya added P2 Important (resolve within 3 days) and removed P3 Normal (resolved within 7 days) labels May 27, 2020
@srjr19
Copy link
Contributor

srjr19 commented May 27, 2020

@sushilshinde @rootelement can you help how do we get events from challenge-api, I don't see any placeholder on API response for curl -X GET "https://api.topcoder.com/v5/challenges/:challengeId" -H "accept: application/json" ?

@srjr19 srjr19 added the Need clarification Need clarification to proceed fixing the issue further label May 27, 2020
@rootelement
Copy link
Contributor

rootelement commented May 29, 2020

This has to be migrated. Working on adding this to the metadata object. it will be as such:

"metadata": [
 {
  "events": [
   {
      "id": 3446,
      "name": "2016 TopCoder(R) Open",
      "key": "tco16"
   }]
  }
],

*Edited to make the structure an array, as expected

@SathyaJayabal
Copy link
Collaborator Author

@rootelement , I think there is a link also associated with the text

@rootelement
Copy link
Contributor

@rootelement
Copy link
Contributor

it gets id, event_desc, and event_short_desc

@SathyaJayabal
Copy link
Collaborator Author

@rootelement , I see a link also here in this example.
https://www.topcoder.com/challenges/30106190

@rootelement
Copy link
Contributor

That link is built on the frontend, it's not part of the api response

@rootelement
Copy link
Contributor

This is done in dev:
http://api.topcoder-dev.com/v5/challenges?legacyId=30051154

Will run on prod overnight

@sushilshinde
Copy link
Collaborator

@simranb86 waiting on PR

@srjr19 srjr19 removed the Need clarification Need clarification to proceed fixing the issue further label May 30, 2020
@srjr19
Copy link
Contributor

srjr19 commented May 30, 2020

@srjr19
Copy link
Contributor

srjr19 commented May 30, 2020

@simranb86 waiting on PR

Sorry I thought I already pushed it, has it ready once received the info. Pushed in PRs now.

sushilshinde added a commit that referenced this issue Jun 1, 2020
@SathyaJayabal
Copy link
Collaborator Author

@sushilshinde , can see the eligible events on dev, but not on prod
example: https://beta-community-app.topcoder.com/challenges/d9c74629-762f-4464-9753-ebd982c7990f
cc @rootelement
Screenshot 2020-06-01 at 5 31 58 PM

@srjr19
Copy link
Contributor

srjr19 commented Jun 1, 2020

@SathyaJayabal yes, this is data issue, plz make sure you test with challenge which has events in it - try this via postman https://api.topcoder-dev.com/v5/challenges/<challengeId> to see if that challenge has events there in response.

@SathyaJayabal
Copy link
Collaborator Author

@simranb86, on testing after the data migration in dev. I can see the events in the api response, but not in the front end. Can you please take a look.
cc @sushilshinde
https://test-community-app.topcoder-dev.com/challenges/3c56f0ad-5060-443f-990a-94c384ec41d3
http://api.topcoder-dev.com/v5/challenges/3c56f0ad-5060-443f-990a-94c384ec41d3
V4 URL:https://qa-community-app.topcoder-dev.com/challenges/30051173
Screenshot 2020-06-02 at 4 49 40 PM
Screenshot 2020-06-02 at 4 49 47 PM

@srjr19 srjr19 removed the QA Fail QA verification on Dev has failed. Assignee to redo the fix. label Jun 3, 2020
@srjr19
Copy link
Contributor

srjr19 commented Jun 3, 2020

@sushilshinde , can see the eligible events on dev, but not on prod
example: https://beta-community-app.topcoder.com/challenges/d9c74629-762f-4464-9753-ebd982c7990f
cc @rootelement
Screenshot 2020-06-01 at 5 31 58 PM

@SathyaJayabal The backend impl was changed, it is re-work to be done here. The metadata was an object but now it has been updated to be an array.

Now I get this

"metadata":[{"events":[{"id":3446,"name":"2016 TopCoder(R) Open","key":"tco16"}]}]

@rootelement can you confirm whether metadata will be array or object as it would mean re-work again, if I change it to be an array now and in future we return object again ?

@sushilshinde FYI ☝️

@rootelement
Copy link
Contributor

I apologize @simranb86 , metadata was always intended to be an array of objects with {type, value}.

See here:
http://api.topcoder-dev.com/v5/challenges/ce01f468-e5cc-4c03-abe6-0e625af94ec1

Events is no different:
http://api.topcoder-dev.com/v5/challenges/3c56f0ad-5060-443f-990a-94c384ec41d3

@srjr19
Copy link
Contributor

srjr19 commented Jun 3, 2020

I apologize @simranb86 , metadata was always intended to be an array of objects with {type, value}.

See here:
http://api.topcoder-dev.com/v5/challenges/ce01f468-e5cc-4c03-abe6-0e625af94ec1

Events is no different:
http://api.topcoder-dev.com/v5/challenges/3c56f0ad-5060-443f-990a-94c384ec41d3

Thanks @rootelement

@SathyaJayabal @sushilshinde give me like 30 mins, will raise new PR for the changes. Thanks

@srjr19 srjr19 added Need clarification Need clarification to proceed fixing the issue further and removed tcx_ReadyForReview labels Jun 3, 2020
@sushilshinde
Copy link
Collaborator

@simranb86 please link PR

@srjr19
Copy link
Contributor

srjr19 commented Jun 3, 2020

@simranb86 please link PR

@sushilshinde this is pending for @rootelement to provide a challenge which has events in valid format. I already flagged him on slack and waiting for him to provide one which could be used for development and then can pass to qa to validate it.

@rootelement
Copy link
Contributor

Events is now a first class object:
http://api.topcoder-dev.com/v5/challenges?legacyId=30051173

Also, metadata is {name, value}, not {type, value}
http://api.topcoder-dev.com/v5/challenges?legacyId=30048648

please update accordingly and see my big update in slack for today.

@srjr19 srjr19 removed the Need clarification Need clarification to proceed fixing the issue further label Jun 4, 2020
@srjr19
Copy link
Contributor

srjr19 commented Jun 4, 2020

Events is now a first class object:
http://api.topcoder-dev.com/v5/challenges?legacyId=30051173

Also, metadata is {name, value}, not {type, value}
http://api.topcoder-dev.com/v5/challenges?legacyId=30048648

please update accordingly and see my big update in slack for today.

Thanks @rootelement

@sushilshinde PR for the same topcoder-platform/topcoder-react-lib#180

@sushilshinde sushilshinde changed the title [$40]Challenge Details: Eligible events section not displayed [$60]Challenge Details: Eligible events section not displayed Jun 5, 2020
@sushilshinde
Copy link
Collaborator

Thanks @simranb86

@SathyaJayabal
Copy link
Collaborator Author

verified on beta
Screenshot 2020-06-05 at 8 23 46 PM
Screenshot 2020-06-05 at 8 24 41 PM

@crazyk07
Copy link

crazyk07 commented Jun 6, 2020

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30126891

This is an automated message for crazyk via Topcoder X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants