mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-04 10:37:19 +02:00
Task
- Å duration field is stored in raw form, but must still be parseable.
This commit is contained in:
parent
d2a5a89bcf
commit
64c9cbe943
1 changed files with 21 additions and 3 deletions
24
src/Task.cpp
24
src/Task.cpp
|
@ -2032,9 +2032,27 @@ void Task::modify (modType type, bool text_required /* = false */)
|
||||||
else if (name == "recur" ||
|
else if (name == "recur" ||
|
||||||
column->type () == "duration")
|
column->type () == "duration")
|
||||||
{
|
{
|
||||||
// Store the raw value, for 'recur', else result.
|
// The duration is stored in raw form, but it must still be valid,
|
||||||
set (name, value);
|
// and therefore is parsed first.
|
||||||
++modCount;
|
try
|
||||||
|
{
|
||||||
|
Eval e;
|
||||||
|
e.addSource (domSource);
|
||||||
|
e.addSource (namedDates);
|
||||||
|
e.ambiguity (false);
|
||||||
|
contextTask = *this;
|
||||||
|
|
||||||
|
Variant v;
|
||||||
|
e.evaluateInfixExpression (value, v);
|
||||||
|
if (v.type () == Variant::type_duration)
|
||||||
|
{
|
||||||
|
// Store the raw value, for 'recur'.
|
||||||
|
set (name, value);
|
||||||
|
++modCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (...) { /* NOP */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need handling for numeric types, used by UDAs.
|
// Need handling for numeric types, used by UDAs.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue