mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-05 14:07:21 +02:00
Task Validation
- Shifted test for priority values from Att.cpp to Task.cpp.
This commit is contained in:
parent
1b5648c922
commit
2135cb141d
2 changed files with 10 additions and 0 deletions
|
@ -952,6 +952,15 @@ void Task::validate () const
|
|||
if (has ("wait") &&
|
||||
getStatus () == Task::recurring)
|
||||
throw std::string (STRING_TASK_VALID_WAIT_RECUR);
|
||||
|
||||
if (has ("priority"))
|
||||
{
|
||||
std::string priority - get ("priority");
|
||||
if (priority != "H" &&
|
||||
priority != "M" &&
|
||||
priority != "L")
|
||||
throw format (STRING_TASK_VALID_PRIORITY, priority);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue