mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Bug Fix - #312 Changing one task changes another
- Added a warning when modifying recurring tasks, that all instances of that task may be modified. When task confirms a bulk edit the recurrence is again indicated (thanks to Cory Donnelly).
This commit is contained in:
parent
6e673d2834
commit
bc40ab63b3
5 changed files with 21 additions and 4 deletions
|
@ -8,6 +8,9 @@
|
||||||
annotations was edited (thanks to Joe Pulliam).
|
annotations was edited (thanks to Joe Pulliam).
|
||||||
+ Fixed bug #314 where the edit command fails when data.location includes
|
+ Fixed bug #314 where the edit command fails when data.location includes
|
||||||
directories containing spaces (thanks to Cory Donnelly).
|
directories containing spaces (thanks to Cory Donnelly).
|
||||||
|
+ Added a warning (issue #312) when modifying recurring tasks, that all
|
||||||
|
instances of that task may be modified. When task confirms a bulk edit
|
||||||
|
the recurrence is again indicated (thanks to Cory Donnelly).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,15 @@ bool Permission::confirmed (const Task& task, const std::string& question)
|
||||||
<< task.id
|
<< task.id
|
||||||
<< " \""
|
<< " \""
|
||||||
<< task.get ("description")
|
<< task.get ("description")
|
||||||
<< "\""
|
<< "\"";
|
||||||
<< std::endl;
|
|
||||||
|
if (task.getStatus () == Task::recurring ||
|
||||||
|
task.has ("parent"))
|
||||||
|
{
|
||||||
|
std::cout << " (Recurring)";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << std::endl;
|
||||||
|
|
||||||
int answer = confirm3 (question);
|
int answer = confirm3 (question);
|
||||||
if (answer == 2)
|
if (answer == 2)
|
||||||
|
|
|
@ -134,7 +134,7 @@ void Task::setEntry ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Task::status Task::getStatus ()
|
Task::status Task::getStatus () const
|
||||||
{
|
{
|
||||||
return textToStatus (get ("status")); // No i18n
|
return textToStatus (get ("status")); // No i18n
|
||||||
}
|
}
|
||||||
|
|
|
@ -958,6 +958,13 @@ int handleModify (std::string &outs)
|
||||||
task->get ("parent") == other->get ("parent")) || // Sibling
|
task->get ("parent") == other->get ("parent")) || // Sibling
|
||||||
other->get ("uuid") == task->get ("parent")) // Parent
|
other->get ("uuid") == task->get ("parent")) // Parent
|
||||||
{
|
{
|
||||||
|
if (task->has ("parent"))
|
||||||
|
std::cout << "Task "
|
||||||
|
<< task->id
|
||||||
|
<< " is a recurring task, and all other instances of this"
|
||||||
|
<< " task may be modified."
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
Task before (*other);
|
Task before (*other);
|
||||||
|
|
||||||
// A non-zero value forces a file write.
|
// A non-zero value forces a file write.
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
|
|
||||||
void setEntry ();
|
void setEntry ();
|
||||||
|
|
||||||
status getStatus ();
|
status getStatus () const;
|
||||||
void setStatus (status);
|
void setStatus (status);
|
||||||
|
|
||||||
int getTagCount ();
|
int getTagCount ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue