GothenburgBitFactory / GothenburgBitFactory/taskwarrior
Make due date coefficient time-dependent for overdue tasks beyond 7 days
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 423
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 11
Description
I see some reference was made to a similar feature here: https://github.com/GothenburgBitFactory/taskwarrior/issues/1529
What I have in mind is a function similar to the age coefficient, where tasks have increased urgency with age, up to a specific max. Simply put, I want a coefficient applied to tasks so that tasks that _were_ due on a given time earlier than some other time, have a higher urgency.
Eg. task due = 1 day ago = 1
task due >= 4 weeks ago = 20
task due >= 8 weeks ago = 50
etc.
I don't really have _any idea_ what the specific values should be, but if I have a task due at 07:00AM and one due at 07:30AM, and miss both, but both remain actionable, it seems reasonable to suspect that the first is going to be of a higher priority. Naturally, I think this should be an opt-in feature as opposed to a likely default.
Of course, things work as described given days within 7 days, but beyond that...
Good practice might be to review and set new due dates with tasksh or similar for dues over 7 days old - equally, for projects that are rigid in relative deadlines but not in actual deadline, this simply creates unnecessary work.
Say you have a project related to your model building hobby. You originally set a due date X to have the base model done, another to have the wiring done, another to have the painting done. Maybe you have other tasks about gathering materials, showing it to people, documenting the process in, say, a vlog or blog format. Now maybe as time goes on you start randomly adding yet more potential models... Then you have to work overtime for a few weeks, your deadlines are all out of whack!
But for the sake of context:home project:modelling, you don't want all those old tasks to be treated as equal. You want the older tasks to be given a higher urgency.
---
It being a scaling multiplier as opposed to a simple 0.01 urgency point increase for every task slightly older seems like it would play better with the rest of the urgency system.
I realize this breaks the prescription to suggest features that cannot be implemented with external scripts or with hooks, but (reasonably speaking) most features can be implemented that way, and this seems like something that people may expect to be built in. (I actually have a modified taskwarrior that I use for something other than task management, fex.)
Equally, bending the rules about implementation, implementation is trivial:
```
float days_overdue = (now - due) / 86400.0;
if (Task::urgencyDueMax == 0 || days_overdue > Task::urgencyDueMax)
return 1.0;
else if (days_overdue >= -14.0) return ((days_overdue + 14.0) * 0.8 / 21.0) + 0.2;
else return 0.2; // > 2 wks
}
```
What is less trivial is deciding the coefficient here - with the above code and a DueMax of 100 years - a silly number, perhaps - tasks with (equally silly) old due dates return silly numbers. Is that actually an issue? Only time using it will tell!
Contributor guide
Assessment
This issue has not been assessed yet.