-
Notifications
You must be signed in to change notification settings - Fork 136
fix: start date not saved when editing task #516
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
fix: start date not saved when editing task #516
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a critical bug where the Start Date field was not being saved when editing a task. The root cause was an incorrect initialization statement in DetailRouteController.initValues() that used ??= null, which is a no-op that always results in null assignment. The fix changes this to a direct assignment from modify.draft.start, making it consistent with all other date field initializations (end, due, wait, until).
Key Changes:
- Fixed
startValueinitialization ininitValues()to properly load the existing start date from the task draft - Ensured start date persistence across save operations and UI reloads
Comments suppressed due to low confidence (1)
lib/app/modules/detailRoute/controllers/detail_route_controller.dart:118
- The
initValues()method and the start date initialization bug fix lack test coverage. Consider adding unit tests forDetailRouteController.initValues()to verify that all draft fields (includingstartValue) are correctly initialized frommodify.draft, and that the start date persists correctly through save and reload operations. This would prevent similar regressions in the future.
void initValues() {
descriptionValue.value = modify.draft.description;
statusValue.value = modify.draft.status;
entryValue.value = modify.draft.entry;
modifiedValue.value = modify.draft.modified;
startValue.value = modify.draft.start; //start date saves
endValue.value = modify.draft.end;
dueValue.value = modify.draft.due;
waitValue.value = modify.draft.wait;
untilValue.value = modify.draft.until;
priorityValue?.value = modify.draft.priority;
projectValue?.value = modify.draft.project;
tagsValue?.value = modify.draft.tags;
urgencyValue.value = urgency(modify.draft);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think there's confusion about the function of the start attribute. It's
not the creation date nor the modification date, but intended to flag the
time that you actually started to do the thing, and to indicate that the
task is currently in progress. The idea was to track the amount of time it
actually took to perform the task and to bring active tasks to the top. If
you're not using it for that function, null value is correct. (I know that
because I was the taskwarrior designer who came up with that feature) IMHO
it shouldn't be set just because you modified something else.
…On Sun., Dec. 7, 2025, 9:33 a.m. Ruchi Mulik ***@***.***> wrote:
Description
This PR fixes an issue where the Start Date selected while editing a task
was not being saved.
The root cause was that startValue in DetailRouteController.initValues()
was always being set to null, preventing the UI from loading the existing
start value and causing saves to fail silently.
This update ensures:
startValue is initialized correctly from modify.draft.start
The selected Start Date persists after saving
The Start Date appears correctly when returning to the task detail screen
No additional dependencies required.
Fixes #515 <#515>
Screenshots
https://github.com/user-attachments/assets/c3390222-4b8f-440d-9bc7-a5b1ed0105e0
Checklist
- Tests have been added or updated to cover the changes
- Documentation has been updated to reflect the changes
- Code follows the established coding style guidelines
- All tests are passing
------------------------------
You can view, comment on, or merge this pull request online at:
#516
Commit Summary
- e451774
<e451774>
fix: start date not saved when editing task
File Changes
(1 file
<https://github.com/CCExtractor/taskwarrior-flutter/pull/516/files>)
- *M*
lib/app/modules/detailRoute/controllers/detail_route_controller.dart
<https://github.com/CCExtractor/taskwarrior-flutter/pull/516/files#diff-d2e25ecac22f05eca4d7ff27251c780cdba93ee13d72aea5578897764f2bd281>
(2)
Patch Links:
- https://github.com/CCExtractor/taskwarrior-flutter/pull/516.patch
- https://github.com/CCExtractor/taskwarrior-flutter/pull/516.diff
—
Reply to this email directly, view it on GitHub
<#516>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR6S66MOOEPKFVSMY4HFID4AQ3FBAVCNFSM6AAAAACOJPLKRGVHI2DSMVQWIX3LMV43ASLTON2WKOZTG4YDGNJWGMYTGNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
See #419 |
|
Thanks for the clarification • I will open a new PR shortly with the corrected implementation. |
|
I opened a new PR with the corrected implementation: #517 . |
|
Awesome 👍
…On Sun., Dec. 7, 2025, 6:39 p.m. Ruchi Mulik ***@***.***> wrote:
*mulikruchi07* left a comment (CCExtractor/taskwarrior-flutter#516)
<#516 (comment)>
I opened a new PR with the corrected implementation: #516
<#516> .
Closing this one to avoid duplication.
—
Reply to this email directly, view it on GitHub
<#516 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR6S67V4AL5WODPIYCQ2DL4AS3ETAVCNFSM6AAAAACOJPLKRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMRTG44TEOJTGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
This PR fixes an issue where the Start Date selected while editing a task was not being saved.
The root cause was that startValue in DetailRouteController.initValues() was always being set to null, preventing the UI from loading the existing start value and causing saves to fail silently.
This update ensures:
startValue is initialized correctly from modify.draft.start
The selected Start Date persists after saving
The Start Date appears correctly when returning to the task detail screen
No additional dependencies required.
Fixes #515
Screenshots
after.515.mp4
Checklist