mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
79207a8e42
commit
5da3416b79
5 changed files with 21 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
2.4.3 () -
|
||||
|
||||
- TW-70 urgency.user.keyword.<keyword>.coefficient=...
|
||||
- TW-1279 Make default.* not apply to recurring tasks.
|
||||
- TW-1287 Make default.* not apply to synced tasks.
|
||||
- TW-1578 Bash tab completion problems on first run
|
||||
|
|
6
NEWS
6
NEWS
|
@ -12,6 +12,8 @@ New configuration options in taskwarrior 2.4.3
|
|||
|
||||
- Setting 'bulk' to zero is interpreted as infinity, which means there is no
|
||||
amount of changes that is considered dangerous.
|
||||
- The 'urgency.user.keyword.<keyword>.coefficient' setting allows tasks with
|
||||
specific words in the description to have adjusted urgency.
|
||||
|
||||
Newly deprecated features in taskwarrior 2.4.3
|
||||
|
||||
|
@ -19,7 +21,9 @@ Newly deprecated features in taskwarrior 2.4.3
|
|||
|
||||
Removed features in 2.4.3
|
||||
|
||||
-
|
||||
- The 'priority.long' and 'priority.short' column formats are no longer
|
||||
supported.
|
||||
- The 'default.priority' setting is now 'uda.priority.default'.
|
||||
|
||||
Known Issues
|
||||
|
||||
|
|
|
@ -1086,6 +1086,10 @@ Specific tag coefficient.
|
|||
.RS
|
||||
Specific project coefficient.
|
||||
.RE
|
||||
.B urgency.user.keyword.<keyword>.coefficient=...
|
||||
.RS
|
||||
Specific description keyword coefficient.
|
||||
.RE
|
||||
.B urgency.uda.<name>.coefficient=...
|
||||
.RS
|
||||
Presence/absence of UDA data.
|
||||
|
|
10
src/Task.cpp
10
src/Task.cpp
|
@ -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.")
|
||||
{
|
||||
|
|
|
@ -238,6 +238,7 @@ int CmdShow::execute (std::string& output)
|
|||
i->first.substr (0, 8) != "default." &&
|
||||
i->first.substr (0, 21) != "urgency.user.project." &&
|
||||
i->first.substr (0, 17) != "urgency.user.tag." &&
|
||||
i->first.substr (0, 21) != "urgency.user.keyword." &&
|
||||
i->first.substr (0, 12) != "urgency.uda.")
|
||||
{
|
||||
unrecognized.push_back (i->first);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue