-
Notifications
You must be signed in to change notification settings - Fork 212
[$75] Search by date filter #4984
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
Comments
Contest https://www.topcoder.com/challenges/30143204 has been created for this ticket. |
@topcoder-platform/topcodercompetitors @topcoder-platform/tcxcommunity this is open for pickup Submit in 8 hours and PR to https://github.com/topcoder-platform/community-app/tree/feature-refactor-challengelist run |
Contest https://www.topcoder.com/challenges/30143204 has been updated - it has been assigned to cagdas001. |
@luizrrodrigues @SathyaJayabal can't reproduce. It shows same challenges with prod. Please check if it's still an issue
|
@cagdas001 , please use test env, Staging is in use for another testing. |
What's the url of test env? I had checked the network tab with staging and it was calling the backend to apply filter, as expected |
@cagdas001 Try access challenges: https://test-community-app.topcoder-dev.com/challenges |
Yes I can access the test-community-app, but tried to access topcoder-dev.com to compare results |
@cagdas001 Ah sorry, no able to access challenges directly? https://www.topcoder-dev.com/challenges |
That wasnt working either, but looks like the issue has gone away now. Its working |
@cagdas001 , you can use qa env for comparison |
function filterByStartDate(challenge, state) {
if (!state.startDate) return true;
const submissionPhase = (challenge.phases || []).filter(d => d.name === 'Submission')[0];
const submissionEndDate = submissionPhase ? submissionPhase.scheduledEndDate
: challenge.submissionEndDate;
return moment(state.startDate).isBefore(submissionEndDate);
}
function filterByEndDate(challenge, state) {
if (!state.endDate) return true;
const registrationPhase = (challenge.phases || []).filter(d => d.name === 'Registration')[0];
const registrationStartDate = registrationPhase ? registrationPhase.scheduledStartDate
: challenge.registrationStartDate;
return moment(state.endDate).isAfter(registrationStartDate);
} For end date filter, it checks if the end date is greater than the registration start date Shouldn't it be the opposite? For end date filter, it should check if the end date is greater than the submission end date
|
@cagdas001 the current implementation is correct. If you see, it will return all challenges that were active (and the submission phase was open) during the time period selected. For end date filter, it checks if the end date is greater than the registration start date - we want to make sure the registration started before the selected end date For start date filter, it checks if the submission end date is greater than the start date.- make sure submission phase has not ended before the selected start date |
@cagdas001 , can you create an issue on the challenge api repo for the dates fields issue, with examples please? https://github.com/topcoder-platform/challenge-api/issues |
@cagdas001 I think this filter will works:
|
@luizrrodrigues We should use So I'll implement & fix this feature with the assumption of API is working properly? |
* The date filters at challenge listing page was using `startDateStart` and `endDateEnd` query parameters for `GET /challenges` call. * It now uses `registrationStartDateStart` and `submissionEndDateEnd` instead, in compliance with previous implementation. Addresses topcoder-platform#4984
Your request ( |
@cagdas001 I read all comments. What I said here is, your implementation, search results no match with v4 results (please compare your solution with https://beta-community-app.topcoder.com/challenges |
Yeah because beta still uses frontend filters while you migrated sorting & filtering to backend with challenge listing revamp. That's what I meant by
Check the frontend filtering implementation above, you'll see API call uses correct field names |
* The date filters at challenge listing page was using `startDateStart` (start date) and `endDateEnd` (end date) query parameters for `GET /challenges` call. * It now uses `startDateEnd` (end date) and `endDateStart` (start date) instead, in compliance with previous implementation. Addresses topcoder-platform#4984
Updated the PR as per the discussion with @luizrrodrigues on Slack |
@SathyaJayabal Ping me on Slack before QA this one. |
This ticket was not processed for payment. If you would like to process it for payment, please reopen it, add the |
Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30143204 |
The current implementation, returns all challenges that are active within the specified date ranges.
But the new implementation does not return these challenges. Not sure how the new search works, it does not even return challenges which have the start date with the specified date range.
Please compare results with prod.




The text was updated successfully, but these errors were encountered: