fix(TaskBody): show due date instead of start date in task list#3190
Conversation
The recurring tasks change (nextcloud#3021) made the task list prefer the start date over the due date whenever a start date was set, so a task with both a start and a due date wrongly showed its start date and hid the due date (nextcloud#3187). Revert the date column to its pre-0.18.0 behavior: always show the due date. The start date is not the actionable date in the list, and showing it in the same column as the due date - same style, no label - made it impossible to tell which date was shown. Recurrence does not change this: the completion handler advances the due date (anchored on `task.due || task.start`), so the due date is the relevant value for recurring tasks too. The recurring indicator icon is unaffected. This also restores correct overdue semantics: a task is overdue based on its due date only, not its start date. Fixes nextcloud#3187
|
@schulm Thanks a lot for the comprehensive explanation and for providing the fix! |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Fix: task list shows due date instead of start date (#3187)
Problem
Since the recurring-tasks change (#3021), the task list started showing the start date instead of the due date for tasks that have both set — a regression from 0.17.1 (#3187).
Background
I tried to remember the reasoning behind the original change. As best I can reconstruct it, the idea was to surface some date for tasks that have only a start date (which previously showed nothing) — but the precedence ended up backwards, so the start date was preferred in all cases, hiding the due date whenever both were set.
Thinking it through again: the start date isn't the actionable date in the list, and recurrence doesn't change that — the due date is what matters, and it's also the value the recurrence completion advances (
task.due || task.start). Putting a start date in the same unlabeled column as due dates was also the source of the "which date is this?" confusion.Fix
Revert the date column to its pre-0.18.0 behavior: always show the due date.
v-if="task.due || task.completed"dueDateShort/dueDateLonguse the due date directlyThe recurring indicator icon is unaffected. Start-only tasks show no date text (the long-standing behavior) and still get the existing
CalendarClockicon hint.Testing
npm run lint,npm run dev, and the unit test suite (vitest) all pass.Fixes #3187