From 963e79696bf6da3cebd0dc601fad3b79661777d5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 10 Oct 2014 16:27:55 -0400 Subject: [PATCH] TW-1354 - Tweaks. --- ChangeLog | 3 ++- NEWS | 2 ++ src/Task.cpp | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d8a2b621..f8084d224 100644 --- a/ChangeLog +++ b/ChangeLog @@ -139,7 +139,8 @@ - TW-1341 confirmation config setting should apply to config command as well (thanks to Charles Ulrich). - TW-1345 taskrc.5 manpage errors. -- TW-1354 Add value-dependent urgency coefficients for UDAs. +- TW-1354 Add value-dependent urgency coefficients for UDAs (thanks to Johannes + Schlatow). - TW-1359 "one-two-three" in description triggers Malformed ID error. - TW-1360 color.until directive missing. - TW-1361 Strange results with complex filter (thanks to Jim B). diff --git a/NEWS b/NEWS index 7218e0ea6..56ad48f7e 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,8 @@ New configuration options in taskwarrior 2.4.0 - New 'debug.hooks' for debugging hook scripts. - New 'debug.parser' for debugging parser issues scripts. - New 'color.label.sort' is used to color the column label of sort columns. + - New 'urgency.uda..' allows specific UDA values to affect + urgency. Newly deprecated features in taskwarrior 2.4.0 diff --git a/src/Task.cpp b/src/Task.cpp index 734f1c16c..eb5365fc0 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -25,7 +25,6 @@ //////////////////////////////////////////////////////////////////////////////// #include -#include // TODO Remove #include #include #include @@ -1683,14 +1682,15 @@ float Task::urgency_c () const } else if (var->first.substr (0, 12) == "urgency.uda.") { - // urgency.uda..coefficient and urgency.uda...coefficient + // urgency.uda..coefficient + // urgency.uda...coefficient std::string::size_type end = var->first.find (".coefficient"); if (end != std::string::npos) { - const std::string uda = var->first.substr (12, end -12); - std::string::size_type dot = uda.find("."); + const std::string uda = var->first.substr (12, end - 12); + std::string::size_type dot = uda.find ("."); if (dot == std::string::npos) - { + { // urgency.uda..coefficient if (has (uda)) value += var->second;