Open tschaffter opened 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.
@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)
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
.
@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
, thenChallenge.createdAt
is set to the value ofChallenge.startDate
(converted todate-time
format).