mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
parent
6cd5bf1237
commit
a69b0c8032
2 changed files with 17 additions and 1 deletions
|
@ -169,9 +169,14 @@ void TDB2::modify (Task& task)
|
|||
update = true;
|
||||
}
|
||||
if (update) {
|
||||
// An empty string indicates the value should be removed.
|
||||
if (v_new == "") {
|
||||
tctask.set_value(k, {});
|
||||
} else {
|
||||
tctask.set_value(k, make_optional (v_new));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we've now added and updated properties; but must find any deleted properties
|
||||
for (auto kv : tctask_map) {
|
||||
|
|
11
test/tw-3109.t
Normal file
11
test/tw-3109.t
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
. bash_tap_tw.sh
|
||||
|
||||
task add emptyval
|
||||
task 1 done
|
||||
task 1 mod end: status:pending
|
||||
task_end=`task 1 info | grep ^End | sed -e 's/^End //' || true`
|
||||
echo "task_end: $task_end"
|
||||
|
||||
# `task mod end:` should have deleted the end.
|
||||
[[ "$task_end" == "" ]]
|
Loading…
Add table
Add a link
Reference in a new issue