- TW-296 urgency of blocked task should affect urgency of blocking task (thanks
         to Sitaram Chamarty).
This commit is contained in:
Paul Beckingham 2014-07-06 17:19:29 -04:00
parent 7548ce662a
commit af75fa8b05
5 changed files with 22 additions and 14 deletions

View file

@ -221,3 +221,4 @@ suggestions:
Charles Ulrich
Jack
Kevin Ballard
Sitaram Chamarty

View file

@ -66,6 +66,8 @@
- TW-288 `task edit` mangles descriptions with embedded newlines (thanks to
Kevin Ballard).
- TW-294 Display UUID of task created by add (thanks to John West).
- TW-296 urgency of blocked task should affect urgency of blocking task (thanks
to Sitaram Chamarty).
- TW-306 Wrong date format in burndown view (thanks to Michele Santullo).
- TW-752 task ID no longer defaults to info (thanks to Christopher Roberts).
- TW-1243 Automatically insert ( ) around user-supplied filter, if any.

2
NEWS
View file

@ -15,6 +15,8 @@ New Features in taskwarrior 2.4.0
- The 'new-uuid' verbosity token shows the UUID of newly created tasks.
- The 'info' report now breaks down urgency values.
- New 'color.until' color rule.
- Using a non-zero 'urgency.inherit.coefficient' value means a task inherits
the urgency values of the dependency chain.
New commands in taskwarrior 2.4.0

View file

@ -999,6 +999,10 @@ Urgency coefficient for blocking tasks
.RS
Urgency coefficient for blocked tasks
.RE
.B urgency.inherit.coefficient=0.0
.RS
Urgency inherited from dependency chain
.RE
.B urgency.due.coefficient=12.0
.RS
Urgency coefficient for due dates

View file

@ -1800,28 +1800,27 @@ float Task::urgency_inherit () const
if (!is_blocking)
return 0.0;
std::vector <Task> blocked;
std::vector <Task>::const_iterator it;
float v = 0.0;
// Calling dependencyGetBlocked is rather expensive.
// It is called recursively for each dependency in the chain here.
// Paul is going to kill me. :)
std::vector <Task> blocked;
dependencyGetBlocked (*this, blocked);
float v = 0.0;
std::vector <Task>::const_iterator it;
for (it = blocked.begin (); it != blocked.end (); ++it)
{
// urgency_blocked, _blocking, _project and _tags left out.
v += it->urgency_active();
v += it->urgency_age();
v += it->urgency_annotations();
v += it->urgency_due();
v += it->urgency_next();
v += it->urgency_priority();
v += it->urgency_scheduled();
v += it->urgency_waiting();
v += it->urgency_active ();
v += it->urgency_age ();
v += it->urgency_annotations ();
v += it->urgency_due ();
v += it->urgency_next ();
v += it->urgency_priority ();
v += it->urgency_scheduled ();
v += it->urgency_waiting ();
// Inherit from all parent tasks in the dependency chain recursively.
v += it->urgency_inherit();
v += it->urgency_inherit ();
}
return v;