Replica add-task silently drops due and wait dates (DateTime.toString is not RFC3339)
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start with AddTaskBottomSheet.onSaveButtonClickedForReplica in lib/app/modules/home/views/add_task_bottom_sheet_new.dart and Replica.addTaskToReplica in lib/app/v3/champion/replica.dart, then inspect parse_datetime in rust/src/api.rs. Run the relevant Dart and Rust tests available in the repository; done means replica-created tasks retain the selected due and wait timestamps in RFC3339-compatible form.
索引モデルが issue の本文から書いたものです。
説明
Description
On the TaskChampion / replica path, creating a task with a due or wait date from the Add Task sheet reports success, but the date is not stored.
The add sheet puts a Dart DateTime into the replica map. Replica.addTaskToReplica then calls .toString() on that value. Dart’s DateTime.toString() uses a space (2026-10-03 12:00:00.000Z). The Rust FFI parse_datetime only accepts RFC3339 (2026-10-03T12:00:00.000Z). Parse failure becomes None, and set_due / set_wait clear the field. The write still succeeds, so the UI shows “task added”.
The edit path already formats with toIso8601String() (which includes T), so dates set on the detail screen survive. Only create is wrong.
This is source-confirmed on main (90700d4). I could not run the Flutter app in this environment (no Flutter SDK).
Steps to reproduce
- Enable TaskChampion replica mode (
settings_taskr_repl). - Open Add Task.
- Enter a description and pick a Due (and/or Wait) date/time.
- Save. Confirm the success snackbar.
- Open the new task (or list it after refresh).
Expected behavior
The due/wait timestamp chosen in the add sheet is stored on the replica task, same as when the same date is set later on the edit screen.
Actual behavior
The task is created without due / wait. The add sheet still reports success.
Technical analysis
Create path
AddTaskBottomSheet.onSaveButtonClickedForReplica (lib/app/modules/home/views/add_task_bottom_sheet_new.dart) passes:
due: getDueDate(homeController.selectedDates)?.toUtc(),
wait: getWaitDate(homeController.selectedDates)?.toUtc(),
Replica.addTaskToReplica (lib/app/v3/champion/replica.dart) stringifies every attribute with:
map[attr] = newTask[attr].toString();
For a UTC DateTime that is 2026-10-03 12:00:00.000Z (space, not T).
FFI
parse_datetime in rust/src/api.rs:
fn parse_datetime(input: &str) -> Option<DateTime<Utc>> {
if input.trim().is_empty() {
return None;
}
input.parse::<DateTime<Utc>>().ok()
}
Empty or unparsable input → None. add_task then does t.set_due(parse_datetime(&value), …) with no error if parse fails. Rust unit fixtures correctly use 2026-09-01T09:00:00Z(withT`), so they never catch this.
Edit path (works)
TaskcDetailsController.saveTask converts with parsed.toUtc().toIso8601String() before modifyTaskInReplica. That string still goes through .toString(), but it is already RFC3339.
Impact
Users on the replica / TaskChampion path (the GSoC v3 default) lose due and wait dates at creation. Overdue highlighting, wait filtering, and sync to other Taskwarrior clients all miss those dates until the user re-enters them on the detail screen. The success snackbar hides the failure.
Possible fix
- In
addTaskToReplica(and anywhere else aDateTimeis put on the map), sendtoUtc().toIso8601String()instead oftoString(). - Optionally make
parse_datetimereject unparsable non-empty strings instead of treating them as “no date”, so a bad format cannot succeed silently. - Add a regression: add a replica task with a due string in Dart
DateTime.toString()form and assert it is stored (or that the write is refused).
Environment
- Repository: CCExtractor/taskwarrior-flutter
- Branch: main (
90700d4f08a58bcaf7e5804352a7bd565ed7ddd8) - App version in pubspec: 3.0.0+3
- Dart SDK constraint:
>=3.0.5 <4.0.0 - TaskChampion FFI:
rust/src/api.rs(taskchampion2.0.3) - Flutter app not run locally (SDK not on PATH)
- 主要言語
- Dart
- スター
- 244
- フォーク
- 180
- 平均マージ
- 20分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CCExtractor/taskwarrior-flutter のほかの issue
-
Fix misaligned text "Select the directory" in settings tile再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CCExtractor/taskwarrior-flutter#639 · コメント 2 件 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Drawer should close automatically when navigating to a new screen再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Sensitive Credentials Stored in Plain Text Files Without Encryption再び着手できるかも @sahu-virendra-1908 が 192 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
CCExtractor/taskwarrior-flutter#645 · コメント 1 件 ·
-
Data Inconsistency When Editing Task (Missing Transaction)再び着手できるかも @aryanorastar が 52 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
CCExtractor/taskwarrior-flutter#643 · コメント 1 件 ·
CCExtractor/taskwarrior-flutter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DataDog/dd-sdk-flutter#1215 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
历史记录加上阅读时间和搜索オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
venera-app/venera-prime#25 · コメント 1 件 ·