mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 22:33:08 +02:00
Task
- Task modifications that involved no 'words' were clobbering the description unnecessarily.
This commit is contained in:
parent
0047bb7325
commit
2030df8563
1 changed files with 12 additions and 9 deletions
21
src/Task.cpp
21
src/Task.cpp
|
@ -2008,9 +2008,8 @@ void Task::modify (modType type)
|
||||||
Variant v;
|
Variant v;
|
||||||
e.evaluateInfixExpression (value, v);
|
e.evaluateInfixExpression (value, v);
|
||||||
|
|
||||||
// TODO if v is duration and < 5y, add to now.
|
// TODO If v is duration and < 5y, add to now, else store as date.
|
||||||
// TODO else store as date.
|
// TODO Not sure if the above still holds true.
|
||||||
|
|
||||||
set (name, v.get_date ());
|
set (name, v.get_date ());
|
||||||
}
|
}
|
||||||
// Special case: type duration.
|
// Special case: type duration.
|
||||||
|
@ -2113,13 +2112,17 @@ void Task::modify (modType type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Task::modType determines what happens to the WORD arguments.
|
// Task::modType determines what happens to the WORD arguments, if there are
|
||||||
switch (type)
|
// any.
|
||||||
|
if (text != "")
|
||||||
{
|
{
|
||||||
case modReplace: set ("description", text); break;
|
switch (type)
|
||||||
case modPrepend: set ("description", text + " " + get ("description")); break;
|
{
|
||||||
case modAppend: set ("description", get ("description") + " " + text); break;
|
case modReplace: set ("description", text); break;
|
||||||
case modAnnotate: addAnnotation (text); break;
|
case modPrepend: set ("description", text + " " + get ("description")); break;
|
||||||
|
case modAppend: set ("description", get ("description") + " " + text); break;
|
||||||
|
case modAnnotate: addAnnotation (text); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue