TW-70: urgency.user.keyword.<keyword>.coefficient=...

- The 'urgency.user.keyword.<keywrod>.coefficient' setting allows for urgency
  adjustments based on description keywords.
This commit is contained in:
Paul Beckingham
2015-04-05 10:25:42 -04:00
parent 79207a8e42
commit 5da3416b79
5 changed files with 21 additions and 1 deletions

View File

@@ -1677,6 +1677,16 @@ float Task::urgency_c () const
if (hasTag (tag))
value += var->second;
}
// urgency.user.keyword.<keyword>.coefficient
if (var->first.substr (13, 8) == "keyword." &&
(end = var->first.find (".coefficient")) != std::string::npos)
{
std::string keyword = var->first.substr (21, end - 21);
if (get ("description").find (keyword) != std::string::npos)
value += var->second;
}
}
else if (var->first.substr (0, 12) == "urgency.uda.")
{