diff --git a/ChangeLog b/ChangeLog index 9e8bcd1f0..6ad9b0bfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -125,6 +125,7 @@ David Patrick). - TW-1655 Inform "No changes made." when quitting early due to signal (thanks to Daniel Shahaf). +- TW-1664 Notify of waiting→pending promotion (thanks to Daniel Shahaf). - TW-1666 import should reject invalid data (thanks to Daniel Shahaf). - Prevent potential task duplication during import for non-pending tasks. - Show the active context in "context list", if any is active. diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 0f6f757df..ab7ef0dc5 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -274,8 +274,9 @@ control specific occasions when output is generated. This list may contain: project Feedback about project status changes sync Feedback about sync filter Shows the filter used in the command + unwait Notification when a task leaves the 'waiting' state -"affected", "new-id", "new-uuid" and "project" imply "footnote". +"affected", "new-id", "new-uuid" "project" and "unwait" imply "footnote". Note that the "on" setting is equivalent to all the tokens being specified, and the "nothing" setting is equivalent to none of the tokens being specified. @@ -283,7 +284,7 @@ and the "nothing" setting is equivalent to none of the tokens being specified. Here are the shortcut equivalents: verbose=on - verbose=blank,header,footnote,label,new-id,affected,edit,special,project,sync + verbose=blank,header,footnote,label,new-id,affected,edit,special,project,sync,filter,unwait verbose=off verbose=blank,label,new-id,edit diff --git a/src/Config.cpp b/src/Config.cpp index 88006cffc..f5e427c2b 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -79,7 +79,7 @@ std::string Config::_defaults = "#verbose=no # Provide regular feedback\n" "#verbose=nothing # Provide no feedback\n" "# # Comma-separated list. May contain any subset of:\n" - "#verbose=blank,header,footnote,label,new-id,new-uuid,affected,edit,special,project,sync,filter\n" + "#verbose=blank,header,footnote,label,new-id,new-uuid,affected,edit,special,project,sync,filter,unwait\n" "confirmation=yes # Confirmation on delete, big changes\n" "recurrence=yes # Enable recurrence\n" "recurrence.confirmation=prompt # Confirmation for propagating changes among recurring tasks (yes/no/prompt)\n" diff --git a/src/Context.cpp b/src/Context.cpp index 6b1cb8666..09030b4c9 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -539,7 +539,8 @@ bool Context::verbose (const std::string& token) v != "special" && // v != "project" && // v != "sync" && // - v != "filter") // + v != "filter" && // + v != "unwait") // { // This list emulates rc.verbose=off in version 1.9.4. verbosity = {"blank", "label", "new-id", "edit"}; @@ -550,7 +551,7 @@ bool Context::verbose (const std::string& token) if (! verbosity.count ("footnote")) { // TODO: Some of these may not use footnotes yet. They should. - for (auto flag : {"affected", "new-id", "new-uuid", "project"}) + for (auto flag : {"affected", "new-id", "new-uuid", "project", "unwait"}) { if (verbosity.count (flag)) { diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 61246a027..2b434bd6f 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -1190,6 +1190,9 @@ int TDB2::gc () task.set ("status", "pending"); task.remove ("wait"); pending_changes = true; + + if (context.verbose ("unwait")) + context.footnote (format (STRING_TDB2_UNWAIT, task.get ("description"))); } pending_tasks_after.push_back (task); @@ -1229,6 +1232,9 @@ int TDB2::gc () pending_tasks_after.push_back (task); pending_changes = true; completed_changes = true; + + if (context.verbose ("unwait")) + context.footnote (format (STRING_TDB2_UNWAIT, task.get ("description"))); } pending_tasks_after.push_back (task); diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index d6eb5c766..1c14a1adf 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -878,6 +878,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Rückgängig machen abgeschlossen." #define STRING_TDB2_UNDO_SYNCED "Kann Änderung nicht rückgängig machen, weil die Aufgabe bereits abgeglichen wurde. Aufgabe stattdessen löschen." #define STRING_TDB2_DIRTY_EXIT "Beende mit ungeschriebenen Änderungen auf {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "Dieser Report hat eine Mindestbreite von {1} und passt nicht in die Bildschirmbreite von {2}." diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index 43c3225e9..93fd51cbd 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -876,6 +876,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Undo complete." #define STRING_TDB2_UNDO_SYNCED "Cannot undo change because the task was already synced. Modify the task instead." #define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "The report has a minimum width of {1} and does not fit in the available width of {2}." diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index fe5a2c9df..19877b362 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -878,6 +878,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Malfaris komplete." #define STRING_TDB2_UNDO_SYNCED "Ne povos malfari ŝanĝon ĉar la tasko estis jam sinkronigita. Modifu anstataŭe la taskon." #define STRING_TDB2_DIRTY_EXIT "Eliranta kun neskribitajn ŝanĝojn al {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "La raporto havas larĝecminimumon {1}, al kio ne konformas la disponebla larĝeco {2}." diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index 863757178..48b85e663 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -891,6 +891,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Deshacer completado." #define STRING_TDB2_UNDO_SYNCED "No se puede deshacer el cambio porque la tarea ya ha sido sincronizada. Como alternativa, modifique la tarea." #define STRING_TDB2_DIRTY_EXIT "Saliendo con cambios sin escribir a {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "El informe tiene una anchura mínima de {1} y no cabe en la disponible, que es {2}." diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index 20ca1cfb6..b3c805bb7 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -878,6 +878,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Annulation terminée." #define STRING_TDB2_UNDO_SYNCED "Impossible d'annuler les changements car la tâche a déjà été synchronysée. Modifiez plutôt la tâche." #define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "The report has a minimum width of {1} and does not fit in the available width of {2}." diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index 925d0025c..aefe69a43 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -877,6 +877,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Undo completato." #define STRING_TDB2_UNDO_SYNCED "Cannot undo change because the task was already synced. Modify the task instead." #define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "Il report ha larghezza minima di {1} e non entra nella larghezza disponibile di {2}." diff --git a/src/l10n/jpn-JPN.h b/src/l10n/jpn-JPN.h index 2191fa84d..cabc32725 100644 --- a/src/l10n/jpn-JPN.h +++ b/src/l10n/jpn-JPN.h @@ -878,6 +878,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Undo complete." #define STRING_TDB2_UNDO_SYNCED "Cannot undo change because the task was already synced. Modify the task instead." #define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "The report has a minimum width of {1} and does not fit in the available width of {2}." diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index b3bc47143..21a9ed0e0 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -878,6 +878,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Operacja cofnięcia zakończona." #define STRING_TDB2_UNDO_SYNCED "Nie można cofnąć zmian ponieważ zadanie zostało zsynchronizowane. Zmodyfikuj zadanie." #define STRING_TDB2_DIRTY_EXIT "Zamykanie z niezapisanymi zmianami w {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "Raport ma minimalną szerokość {1} i nie mieści się w dostępnej przestrzeni {2}." diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index 423d18ea9..3275b5ec0 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -878,6 +878,7 @@ #define STRING_TDB2_UNDO_COMPLETE "Reversão concluída." #define STRING_TDB2_UNDO_SYNCED "Não é possível reverter a alteração porque a tarefa já foi syncronizada. Em vez disso modifique a tarefa." #define STRING_TDB2_DIRTY_EXIT "Saindo com modificações por gravar de {1}" +#define STRING_TDB2_UNWAIT "Un-waiting task '{1}'" // View #define STRING_VIEW_TOO_SMALL "O relatório tem uma largura mínima de {1} e não cabe na largura disponível {2}." diff --git a/test/wait.t b/test/wait.t index 4d322050f..72f180d69 100755 --- a/test/wait.t +++ b/test/wait.t @@ -62,6 +62,8 @@ class TestWait(TestCase): self.assertIn("visible", out) self.assertIn("hidden", out) + self.assertIn("Un-waiting task 'hidden'", err) + class TestBug434(TestCase): # Bug #434: Task should not prevent users from marking as done tasks with