mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
- T object support status "r"
This commit is contained in:
parent
6066cc3bab
commit
647cbab3f4
3 changed files with 6 additions and 4 deletions
|
@ -21,7 +21,7 @@ Test Suite
|
|||
regression tests for every bug, command, feature
|
||||
|
||||
Recurrence
|
||||
- new T::status recurring (stored as R)
|
||||
+ new T::status recurring (stored as R)
|
||||
- new user-specifiable attributes - recur:<duration> [until:<date>]
|
||||
- duration:
|
||||
daily, day, 1d
|
||||
|
|
|
@ -247,7 +247,7 @@ void T::setSubstitution (const std::string& from, const std::string& to)
|
|||
// uuid status [tags] [attributes] description
|
||||
//
|
||||
// uuid \x{8}-\x{4}-\x{4}-\x{4}-\x{12}
|
||||
// status - O X
|
||||
// status - + X r
|
||||
// tags \w+ \s ...
|
||||
// attributes \w+:\w+ \s ...
|
||||
// description .+
|
||||
|
@ -261,6 +261,7 @@ const std::string T::compose () const
|
|||
if (mStatus == pending) line += "- [";
|
||||
else if (mStatus == completed) line += "+ [";
|
||||
else if (mStatus == deleted) line += "X [";
|
||||
else if (mStatus == recurring) line += "r [";
|
||||
|
||||
// Tags
|
||||
for (size_t i = 0; i < mTags.size (); ++i)
|
||||
|
@ -303,6 +304,7 @@ const std::string T::composeCSV ()
|
|||
if (mStatus == pending) line += "'pending',";
|
||||
else if (mStatus == completed) line += "'completed',";
|
||||
else if (mStatus == deleted) line += "'deleted',";
|
||||
else if (mStatus == recurring) line += "'recurring',";
|
||||
|
||||
// Tags
|
||||
line += "'";
|
||||
|
@ -499,7 +501,7 @@ int T::determineVersion (const std::string& line)
|
|||
line[18] == '-' &&
|
||||
line[23] == '-' &&
|
||||
line[36] == ' ' &&
|
||||
(line[37] == '-' || line[37] == '+' || line[37] == 'X'))
|
||||
(line[37] == '-' || line[37] == '+' || line[37] == 'X' || line[37] == 'r'))
|
||||
return 2;
|
||||
|
||||
// Version 3?
|
||||
|
|
2
src/T.h
2
src/T.h
|
@ -37,7 +37,7 @@
|
|||
class T
|
||||
{
|
||||
public:
|
||||
enum status {pending, completed, deleted};
|
||||
enum status {pending, completed, deleted, recurring};
|
||||
|
||||
T (); // Default constructor
|
||||
T (const std::string&); // Initialize by parsing storage format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue