Sage-Bionetworks / rocc-service

ROCC REST API service
Apache License 2.0
1 stars 0 forks source link

Set Challenge.createdAt differently for closed challenges #126

Open tschaffter opened 3 years ago

tschaffter commented 3 years ago

@vpchung I gave more thought to what you said this morning about dump of past challenges appearing as Newest challenges. What about doing the following? If Challenge.status == closed, then Challenge.createdAt is set to the value of Challenge.startDate (converted to date-time format).

tschaffter commented 3 years ago

Not sold yet on the above idea. I see createdAt and updatedAt as fields that could be useful for "audits" and should not be tempered with lightly. These two properties have also a clear definition that we would not respect with the strategy mentioned above.

vpchung commented 3 years ago

@tschaffter I agree that having information about createdAt and updatedAt would be useful, especially when a use case for tracking information about challenge updates is wanted/needed.

My main concern is more about how we are sorting the challenges with createdAt and updatedAt as the parameter. Personally, if I were a user, I would expect "Newest" to show me challenges with newer start dates, not challenges that have been recently added/modified. That said, we could mitigate this confusion altogether by having some label on the UI side that says something like:

Sort by modification date (newest / oldest)

tschaffter commented 3 years ago

if I were a user, I would expect "Newest" to show me challenges with newer start dates

How would you implement this sorting? Would you achieve this with updatedAt (it would not mean that the start date has changed, maybe the description of the challenge changed)?

I'm currently not using updatedAt but it could be interesting to short by Last modified.