GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.01k stars 277 forks source link

Identifying & modifying progressive coefficient factors #2411

Open l0f4r0 opened 3 years ago

l0f4r0 commented 3 years ago

Out of the box, taskwarrior comes with some progressive coefficient factors. For example, those associated to number of tags/annotations:

Configuration doesn't detail them explicitely. One can only read their max value:

urgency.annotations.coefficient 1.0
urgency.tags.coefficient 1.0

So please:

tbabej commented 3 years ago

Hi @l0f4r0 ,

the urgency.tags.coefficient is not a max value, but rather a multiplier that is being applied to the underlying "raw" value coming from the number of tags, see urgency_c method of the Task object: https://github.com/GothenburgBitFactory/taskwarrior/blob/cdbab698e330fe0f896d3f12b27dd7286748fec1/src/Task.cpp#L1815

When it comes to the underlying value that you mention (0.8, 0.9 and 1.0 for 1, 2, and 3 tags respectively) - that is currently hardcoded and not accessible from the configuration: https://github.com/GothenburgBitFactory/taskwarrior/blob/cdbab698e330fe0f896d3f12b27dd7286748fec1/src/Task.cpp#L1988-L1998

In order to modify the raw underlying value, you'd need to change the code of the method above and compile from source.

l0f4r0 commented 3 years ago

Hi @tbabej,

the urgency.tags.coefficient is not a max value, but rather a multiplier that is being applied to the underlying "raw" value coming from the number of tags

Exactly, thanks

When it comes to the underlying value that you mention (0.8, 0.9 and 1.0 for 1, 2, and 3 tags respectively) - that is currently hardcoded and not accessible from the configuration. In order to modify the raw underlying value, you'd need to change the code of the method above and compile from source.

Could we imagine, as a feature request, to add a configuration item for this? And maybe 2 different items actually: one for tags, the other for annotations?

tbabej commented 3 years ago

I think we should make urgency computation a bit more customizable. I've added some of my thoughts in #2492 ..