I have a question. Let's say that I have created User Defined Attribute attr
with values A,B,C
.
How to configure taskwarrior to automatically change the attr
value from A
to B
when I enter
task x start
and change attr
from B
to C
when
task x done
Disadvantage of suggested solution:
task x start
command, and the change of UDAattr
WSL Ubuntu 16.04
.Assumptions:
If you enter
task x start
the attributeStart
is set to a valid date.Solution:
You can have a script running in the background that reads the properties of all tasks, and as soon as it detects a valid date in the
Start
attribute of a tasks, and a value ofB
in the UDAattr
then it sets the UDAattr
toC
by executing the commandtask x modify attr:C
command.I made a script/small project that sorts on a custom setting of project and urgency, and it contains the functionalities of:
So in effect,
attr
here:private static void setCustomSort(ArrayList<Task> taskList) {
1 on line 88 of the main(For the 2nd step, between
//get uuid
and//create command
you should add the condition that checks the task for a valid id. Then if it has, change the command that is generated totask modify attr:C
)The instructions to compile the java code and set up automation are listed here.