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 startcommand, and the change of UDAattrWSL Ubuntu 16.04.Assumptions:
If you enter
task x startthe attributeStartis 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
Startattribute of a tasks, and a value ofBin the UDAattrthen it sets the UDAattrtoCby executing the commandtask x modify attr:Ccommand.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,
attrhere:private static void setCustomSort(ArrayList<Task> taskList) {1 on line 88 of the main(For the 2nd step, between
//get uuidand//create commandyou 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.