mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1664: Notify of waiting→pending promotion
- Thanks to Daniel Shahaf.
This commit is contained in:
parent
4a9a515a36
commit
b1839adf97
15 changed files with 25 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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}."
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue