TW-1488: You have more urgent tasks

- Thanks to Stefan Betz, Denis Kasak.
This commit is contained in:
Paul Beckingham 2015-07-13 11:40:42 -04:00
parent 8ad5fa1b78
commit 326367a36e
3 changed files with 6 additions and 2 deletions

View file

@ -255,3 +255,4 @@ suggestions:
Denis Kasak
David Brenner
Audrey Easterday
Stefan Betz

View file

@ -20,6 +20,7 @@
Babej).
- TW-1480 Weird behaviour on redundant filter beginning with number (thanks to
Tomas Babej).
- TW-1488 You have more urgent tasks (thanks to Stefan Betz, Denis Kasak).
- TW-1527 Extra spaces added around slashes (thanks to Renato Alves).
- TW-1529 Parser incorrectly inserting spaces into task description (thanks to
David Brenner).

View file

@ -422,11 +422,13 @@ bool nag (Task& task)
std::string nagMessage = context.config.get ("nag");
if (nagMessage != "")
{
// Scan all pending tasks.
// Scan all pending, non-recurring tasks.
auto pending = context.tdb2.pending.get_tasks ();
for (auto& t : pending)
{
if (t.urgency () > task.urgency ())
if ((t.getStatus () == Task::pending ||
t.getStatus () == Task::waiting) &&
t.urgency () > task.urgency ())
{
context.footnote (nagMessage);
return true;