- 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

@ -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;