TW-1710: Setting wait date on status:completed / status:deleted

- Thanks to Daniel Shahaf.
This commit is contained in:
Paul Beckingham 2016-02-02 23:24:06 -05:00
parent 8275181022
commit b61471ca0e
11 changed files with 23 additions and 0 deletions

View file

@ -33,6 +33,8 @@
- TW-1704 Use Task::identifier to reference the Task in the output - TW-1704 Use Task::identifier to reference the Task in the output
- TW-1705 Directories in .task/hooks should not be reported as invalid hooks - TW-1705 Directories in .task/hooks should not be reported as invalid hooks
(thanks to Tomas Babej). (thanks to Tomas Babej).
- TW-1710 Setting wait date on status:completed / status:deleted
(thanks to Daniel Shahaf).
- TW-1714 Starting recurring task starts all recurrences - TW-1714 Starting recurring task starts all recurrences
(thanks to Robin Green). (thanks to Robin Green).
- TW-1718 String UDA not passed through unchanged - TW-1718 String UDA not passed through unchanged

View file

@ -1954,6 +1954,9 @@ void Task::modify (modType type, bool text_required /* = false */)
context.debug ("Task::modify"); context.debug ("Task::modify");
std::string label = " MODIFICATION "; std::string label = " MODIFICATION ";
// Need this for later comparison.
auto originalStatus = getStatus ();
std::string text = ""; std::string text = "";
bool mods = false; bool mods = false;
for (auto& a : context.cli2._args) for (auto& a : context.cli2._args)
@ -2084,6 +2087,15 @@ void Task::modify (modType type, bool text_required /* = false */)
} }
else if (! mods && text_required) else if (! mods && text_required)
throw std::string (STRING_CMD_MODIFY_NEED_TEXT); throw std::string (STRING_CMD_MODIFY_NEED_TEXT);
// Modifying completed/deleted tasks generates a message, if the modification
// does not change status.
if ((getStatus () == Task::completed || getStatus () == Task::deleted) &&
getStatus () == originalStatus)
{
auto uuid = get ("uuid").substr (0, 8);
context.footnote (format (STRING_CMD_MODIFY_INACTIVE, uuid, get ("status"), uuid));
}
} }
#endif #endif

View file

@ -540,6 +540,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Aufgabe {1} '{2}' ändern?" #define STRING_CMD_MODIFY_CONFIRM "Aufgabe {1} '{2}' ändern?"
#define STRING_CMD_MODIFY_RECUR "Dies ist eine wiederholende Aufgabe. Möchten Sie alle offenen Wiederholungen dieser Aufgabe ändern?" #define STRING_CMD_MODIFY_RECUR "Dies ist eine wiederholende Aufgabe. Möchten Sie alle offenen Wiederholungen dieser Aufgabe ändern?"
#define STRING_CMD_MODIFY_NEED_TEXT "Weiterer Text muss angegeben werden." #define STRING_CMD_MODIFY_NEED_TEXT "Weiterer Text muss angegeben werden."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "Alle Farben, ein Beispiel, oder eine Legende" #define STRING_CMD_COLOR_USAGE "Alle Farben, ein Beispiel, oder eine Legende"
#define STRING_CMD_COLOR_HERE "Diese Farben werden zur Zeit genutzt:" #define STRING_CMD_COLOR_HERE "Diese Farben werden zur Zeit genutzt:"

View file

@ -538,6 +538,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Modify task {1} '{2}'?" #define STRING_CMD_MODIFY_CONFIRM "Modify task {1} '{2}'?"
#define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?" #define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?"
#define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided." #define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend" #define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend"
#define STRING_CMD_COLOR_HERE "Here are the colors currently in use:" #define STRING_CMD_COLOR_HERE "Here are the colors currently in use:"

View file

@ -540,6 +540,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Modify task {1} '{2}'?" #define STRING_CMD_MODIFY_CONFIRM "Modify task {1} '{2}'?"
#define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?" #define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?"
#define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided." #define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend" #define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend"
#define STRING_CMD_COLOR_HERE "Here are the colors currently in use:" #define STRING_CMD_COLOR_HERE "Here are the colors currently in use:"

View file

@ -551,6 +551,7 @@
#define STRING_CMD_MODIFY_RECUR "Esta es una tarea recurrente. ¿Quiere modificar todas las recurrencias pendientes de esta misma tarea?" #define STRING_CMD_MODIFY_RECUR "Esta es una tarea recurrente. ¿Quiere modificar todas las recurrencias pendientes de esta misma tarea?"
#define STRING_CMD_MODIFY_NEED_TEXT "Se debe proveer texto adicional." #define STRING_CMD_MODIFY_NEED_TEXT "Se debe proveer texto adicional."
//#define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided." COMPROBAR adicional //#define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided." COMPROBAR adicional
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "Todos los colores, una muestra, o una leyenda" #define STRING_CMD_COLOR_USAGE "Todos los colores, una muestra, o una leyenda"
#define STRING_CMD_COLOR_HERE "Aquí están los colores en uso actualmente:" #define STRING_CMD_COLOR_HERE "Aquí están los colores en uso actualmente:"

View file

@ -540,6 +540,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Modify task {1} '{2}'?" #define STRING_CMD_MODIFY_CONFIRM "Modify task {1} '{2}'?"
#define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?" #define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?"
#define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided." #define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend" #define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend"
#define STRING_CMD_COLOR_HERE "Here are the colors currently in use:" #define STRING_CMD_COLOR_HERE "Here are the colors currently in use:"

View file

@ -539,6 +539,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Modificare il task {1} '{2}'?" #define STRING_CMD_MODIFY_CONFIRM "Modificare il task {1} '{2}'?"
#define STRING_CMD_MODIFY_RECUR "Questo è un task periodico. Modificare tutti i task associati?" #define STRING_CMD_MODIFY_RECUR "Questo è un task periodico. Modificare tutti i task associati?"
#define STRING_CMD_MODIFY_NEED_TEXT "Testo aggiunti da specificare." #define STRING_CMD_MODIFY_NEED_TEXT "Testo aggiunti da specificare."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "Tutti i colori, un esempio, o una legenda" #define STRING_CMD_COLOR_USAGE "Tutti i colori, un esempio, o una legenda"
#define STRING_CMD_COLOR_HERE "Coloti in uso:" #define STRING_CMD_COLOR_HERE "Coloti in uso:"

View file

@ -540,6 +540,7 @@
#define STRING_CMD_MODIFY_CONFIRM "タスク {1} '{2}' を変更しますか?" #define STRING_CMD_MODIFY_CONFIRM "タスク {1} '{2}' を変更しますか?"
#define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?" #define STRING_CMD_MODIFY_RECUR "This is a recurring task. Do you want to modify all pending recurrences of this same task?"
#define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided." #define STRING_CMD_MODIFY_NEED_TEXT "Additional text must be provided."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend" #define STRING_CMD_COLOR_USAGE "All colors, a sample, or a legend"
#define STRING_CMD_COLOR_HERE "Here are the colors currently in use:" #define STRING_CMD_COLOR_HERE "Here are the colors currently in use:"

View file

@ -540,6 +540,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Zmienić zadanie {1} '{2}'?" #define STRING_CMD_MODIFY_CONFIRM "Zmienić zadanie {1} '{2}'?"
#define STRING_CMD_MODIFY_RECUR "To zadanie jest cykliczne. Czy chcesz zmodyfikować kolejne zadania w cyklu?" #define STRING_CMD_MODIFY_RECUR "To zadanie jest cykliczne. Czy chcesz zmodyfikować kolejne zadania w cyklu?"
#define STRING_CMD_MODIFY_NEED_TEXT "Należy podać tekst" #define STRING_CMD_MODIFY_NEED_TEXT "Należy podać tekst"
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "Wszystkie kolory, próbki lub legenda" #define STRING_CMD_COLOR_USAGE "Wszystkie kolory, próbki lub legenda"
#define STRING_CMD_COLOR_HERE "To są aktualnie używane kolory:" #define STRING_CMD_COLOR_HERE "To są aktualnie używane kolory:"

View file

@ -540,6 +540,7 @@
#define STRING_CMD_MODIFY_CONFIRM "Modificar tarefa {1} '{2}'?" #define STRING_CMD_MODIFY_CONFIRM "Modificar tarefa {1} '{2}'?"
#define STRING_CMD_MODIFY_RECUR "Esta é uma tarefa recorrente. Deseja modificar todas as recorrências pendentes da mesma?" #define STRING_CMD_MODIFY_RECUR "Esta é uma tarefa recorrente. Deseja modificar todas as recorrências pendentes da mesma?"
#define STRING_CMD_MODIFY_NEED_TEXT "É necessário fornecer mais informação." #define STRING_CMD_MODIFY_NEED_TEXT "É necessário fornecer mais informação."
#define STRING_CMD_MODIFY_INACTIVE "Note: Modified task {1} is {2}. You may wish to make this task pending with: task {3} modify status:pending"
#define STRING_CMD_COLOR_USAGE "Todas as cores, uma amostra ou a legenda" #define STRING_CMD_COLOR_USAGE "Todas as cores, uma amostra ou a legenda"
#define STRING_CMD_COLOR_HERE "Estas são as cores actualmente em uso:" #define STRING_CMD_COLOR_HERE "Estas são as cores actualmente em uso:"