Skip to content

All Challenges and Ongoing Challenges count is incorrect and Ongoing Challenges does not return all Ongoing Challenges #4980

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
Oanh-and-only-Oanh opened this issue Sep 21, 2020 · 9 comments

Comments

@Oanh-and-only-Oanh
Copy link

Oanh-and-only-Oanh commented Sep 21, 2020

Bug:
The count on the All Challenges filter is not accurate.

How to reproduce:

  1. go to https://staging-community-app.topcoder.com/challenges?
  2. Turn off all track filters except for QA track
  3. click on All Challenges filter
  4. See that count is 22 but only 2 challenges show
    image
@Oanh-and-only-Oanh Oanh-and-only-Oanh added listing:re-implementation P1 Urgent (resolve within 24 hours) labels Sep 21, 2020
@Oanh-and-only-Oanh Oanh-and-only-Oanh added this to the Release by 10/1/2020 milestone Sep 21, 2020
@SathyaJayabal
Copy link
Collaborator

@LieutenantRoger , the ongoing challenges bucket is missing some of the challenges
example when u filter by few tracks. See comparison with prod
Screenshot 2020-09-22 at 9 42 18 AM
Screenshot 2020-09-22 at 9 42 21 AM

@LieutenantRoger
Copy link
Collaborator

@rootelement

Could you take a look if I have used the correct filter when fetching challenge data

'All Challenges' count: Request URL: https://api.topcoder-dev.com/v5/challenges/?status=Active&isLightweight=true&perPage=1&tracks[]=Dev&tracks[]=Des&tracks[]=DS&tracks[]=QA

'Ongoing Challenges': Request URL: https://api.topcoder-dev.com/v5/challenges/?status=Active&currentPhaseName=Submission&perPage=10&page=1&sortBy=updated&sortOrder=desc&tracks[]=Dev&tracks[]=Des&tracks[]=DS&tracks[]=QA

The count numbers are retrieved from the response x-total field.

@LieutenantRoger LieutenantRoger added the Need clarification Need clarification to proceed fixing the issue further label Sep 22, 2020
@SathyaJayabal SathyaJayabal changed the title All Challenge count not correct Ongoing Challenges count not correct Sep 23, 2020
@SathyaJayabal SathyaJayabal changed the title Ongoing Challenges count not correct Ongoing Challenges bucket does not return all Ongoing Challenges Sep 23, 2020
@SathyaJayabal SathyaJayabal changed the title Ongoing Challenges bucket does not return all Ongoing Challenges All Challenges and Ongoing Challenges count is incorrect and Ongoing Challenges does not return all Ongoing Challenges Sep 23, 2020
@Oanh-and-only-Oanh Oanh-and-only-Oanh added P2 Important (resolve within 3 days) and removed P1 Urgent (resolve within 24 hours) labels Sep 23, 2020
@rootelement
Copy link
Contributor

That looks fine, but you don't need to include the tracks if you want them all on... unless that's an artifact of the switches in the ui. Either way is fine.

@rootelement
Copy link
Contributor

The second query you could use isLightweight and only retrieve 1 like you are in the first one for it to be faster, but that's also not required.

@LieutenantRoger
Copy link
Collaborator

@rootelement the second query will retrieve the 10 ongoing challenge, and the total ongoing challenge as well, so need to use perPage=10 :)

@Oanh-and-only-Oanh @rootelement ,I believe there are some gaps between server side filters and client side filters(old way), hence the discrepancy above.

@Oanh-and-only-Oanh Oanh-and-only-Oanh modified the milestones: Release by 10/1/2020, by 10/15/2020 Sep 29, 2020
@LieutenantRoger
Copy link
Collaborator

@rootelement please take a look at the discrepancy above. The request is correctly sent, but the total number seems not correct.

@Oanh-and-only-Oanh Oanh-and-only-Oanh added Must-fix-before-listing-release P1 Urgent (resolve within 24 hours) P0 Critical (resolve within 4 hours) and removed P2 Important (resolve within 3 days) P1 Urgent (resolve within 24 hours) labels Oct 8, 2020
@ThomasKranitsas
Copy link
Contributor

Maybe this has been fixed? Buckets seem to work fine on my end
Screenshot 2020-10-08 at 5 41 31 PM
Screenshot 2020-10-08 at 5 41 28 PM

@rootelement
Copy link
Contributor

The decision is to remove this bucket, because it's not useful to members, and it's covered by the All Challenges bucket.

@rootelement rootelement removed API-issue Need clarification Need clarification to proceed fixing the issue further labels Oct 8, 2020
@SathyaJayabal
Copy link
Collaborator

Closing this-
hiding the bucket tracked here
#5073

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

5 participants