Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Bug] OC says that a challenge ends in 4 days, but it has added 4 days ago #2418

Closed tschaffter closed 5 months ago

tschaffter commented 7 months ago

Is there an existing issue for this?

What product(s) are you seeing the problem on?

OpenChallenges

Current behavior

Consider this challenge.

The card shows that the challenge is active ends in 4 days.

image

but the end date is "2023-12-15" (4 days ago).

Expected behavior

The challenge should be marked as complete and it should says that it has completed 4 days ago.

Anything else?

Cc: @rrchai

Commit ID

dad64404889de9d7f5f7caa7fe2b2692aa092c72

Are you developing inside the dev container?

Code of Conduct

tschaffter commented 6 months ago

@vpchung The proposed solution does not prevent the issue from happening again.

@rrchai @vpchung What are the solutions that you can think of that could solve this issue once for all?

tschaffter commented 6 months ago

Moved to Sprint 24.01

rrchai commented 5 months ago

As we curate the DB and update the status of challenges weekly, there could be a 7-day window that exposes opportunities for mismatches (the actual dates & status shown on challenge card & time info "Started ... ago" etc.), which could potentially impact the user experience. Suggested proposals:

Proposal 1

Proposal 2

  1. Let challenge have two properties related to its status.
    • status: dynamic status, automatically changed via startDate & endDate only on the backend (this can be temporarily done on the frontend as well - #2448).
    • isCompleted: boolean whether the challenge is completed or not (current completed challenges can be set with true for this property)
  2. Future: only developers can alter isCompleted - can choose a date (>=Now) or leave blank for endDate.
  3. Future: proposed start/end dates are required properties if not yet and organizers are responsible to update dates to reflect status.

I could also quickly do proposal 1 to solve the issues for any future potential mismatches (only 1 as of 1-24-2024).


Some stats with current challenges data:

tschaffter commented 5 months ago

After giving this issue more though, I think the best strategy is to update the frequency of the data to daily.

@vpchung Could you create a CI workflow that update the OC data once a day?

tschaffter commented 5 months ago

Thanks @rrchai for the suggested solution. As per our discussion, we will increase the frequency of the data updates. @vpchung is currently working the GH workflow that will automate the transformation from Google sheet to CSV.

tschaffter commented 5 months ago

Added to Sprint 24.2