Yes there is! Check out https://taskwarrior.org/docs/hooks_guide.html
You don't even need a package, you just need to write a script that reads JSON from stdin and (optionally, if you want to modify a task) writes JSON to stdout.
There are a couple off issues in the tracker asking to address the recurrence, hence the recurrence rehaul is one of the key features to be released in 2.6/3.0.
You would have to either write or find a hook for it.
It sounds like what you want to be should be relatively simple to implement, though you'd probably have to specify a bit more to be sure that it isn't overly complex.
I've never written one myself though.
Damn... I just found out that recurrence is very limited in this software. Task Warrior always create a new instance task when the due date has passed, even if you have not completed the task.
Emacs Org, for example, has two types of recurrence:
- Create a new instance task when the due date has passed, like Task Warrior. For example, paying bills (you will still have to pay the bills you missed plus the new ones).
- Create a new instance task when you have completed the one you have overdue. For example, watering a plant (it makes no sense to water it two times in a row when you have missed one of them).
Nice this is my first time looking at https://taskwarrior.org/docs/hooks.html ...and so echo "${modified_json}"
is how we return the 1-line json object which Taskwarrior will then parse and use for updating the task?
Thanks for posting this! I'm confronting a near-identical use case (i.e. wanting to set up a recurring task template whose individual instances expire at regular intervals if not already completed) myself.
I'm guessing that, in the 4 months since OP's original post, Taskwarrior has not released a new version with a built-in solution to this problem.
That leaves me in the position of needing to create my own custom, script-based solution...which is a bit beyond my ken at the moment.
Would you be willing to talk a bit more about the bash script you've created to implement this functionality?
Not that I know of. Here's all the named dates in tw:
https://taskwarrior.org/docs/named_dates.html
For weird recurrence rules I like to use remind
What I'd really love is to combine Remind's recurrence capability with taskwarrior's task management. I've been working on a cron script to read chores.rem
and create tasks for me in tw if not already created but it's unwieldy.
In addition to coefficients are dependent tasks and dates. The depends property helps with ordering and visibility of tasks.
There are a numbers of date fields that can help with ordering of tasks. https://taskwarrior.org/docs/using_dates.html
I do recommend reading the documentation to get a better understanding of its features.
No it's not designed to be used that way. It's all based on a an interrelated set of coefficients values to automatically order tasks so you don't waste time manually ordering tasks. This is one of taskwarrior's best features.
https://taskwarrior.org/docs/urgency.html
https://taskwarrior.org/docs/best-practices.html
The best thinng you is explore all the coefficient factors considering your workflow. Consider having useful tags with a specific coefficient. (FIX BUY SELL and in your case NO1 NO2 NO3...) Assign specific coefficients for your projects to your task list is still prioritised across your projects. Should the priority of a project change you just tweak the coefficient of that project
Probably somebody will come by with a better answer, but when I need to see items with better spacing & grouped logically I use a report. https://taskwarrior.org/docs/report.html (The / solidus indicates that project is a break column, which means a blank line is inserted between unique values, for a visual grouping effect. 2.4.0)
Doesn't use color, but does enable spacing -- maybe helpful for you somehow.
Have you tried:
My task recur:daily wait:due-6h sched:due-5h due:eod
Does that work?
Perhaps the hiccup was with the way you used the times?
eod = end of day (and is Current local date, with time 23:59:59.) see https://taskwarrior.org/docs/dates.html
I found the reference to the report footer appearing on task reports:
>Although the current context is included in a footnote after every report,
from here: https://taskwarrior.org/docs/context.html
​
But my report footers only display the number of tasks. There is nothing in my .taskrc that configures verbosity in any way.
You could add tags to indicate the % completion;
task <tid> modify +20%
task <tid> modify +75%
Stick with the granularity that suits you: Maybe 20%, 40%, 60%, 80%, 100% (at which point you review it & can mark it done)
Or you could want 10% steps. or even 5% steps if you desire.
You wouldn't have to go OTT & continuously update tasks with every step; it could be 10%, then you may find you've done 40%, then 75%, then 90%, & 100%.
I also agree with the other answers - break a task down into smaller units, & group them together in a project or subproject
I do this A LOT
task <tid> modify project:WORK.CLIENT.PROJECT_NAME
This is an official supported feature of TaskWarrior! It officially called a "project hierarchy" Read the docs on this great feature here.
You can then filter & list / manage all tasks of a subproject by
task project:WORK.CLIENT.PROJECT_NAME and by
task project:WORK.CLIENT.OTHER_PROJECT_NAME and most awesomely by
task project:WORK.CLIENT which lists / counts all subprojects together!
The key is the full stop which indicates the project hierarchy in TaskWarrior (project names don't have to be all caps - that is just how I like to name projects). Furthermore projects can be nested arbitrarily - you can have subprojects of subprojects, and so on, as deep down as you want!
Also
task projects lists all the projects, with subprojects indented for clarity
TLDR; project hierarchies are an awesome feature of TaskWarrior!
:D
HOPE THIS HELPS, FELLOW HUMANS. SORRY FOR SHOUTING EARLIER.
O_O
Like anything, start with the documentation:
>Use a due date to specify the exact date by which a task must be completed. This corresponds to the last possible moment when the task can be considered on-time.
>
>A scheduled date is different from a due date, and represents the earliest opportunity to work on a task.
I mostly stick with tags, tasks, and subtasks for the structure, with priorities for informal now/soon/eventually scheduling.
Still working out how best to describe broader goals and domains.
Top-level projects kind of work (I have "Site" and "Work" as top-level projects with subprojects for specific projects or narrower domains), but there can be overlap. There's also the "Work is never done" aspect of using top-level projects as domains. It plays hell with your project statistics and keeps that endorphin rush of completion forever out of reach.
I experimented with a UDA for domains. It cluttered things up and was just reinventing tags, poorly.
Current experiment, started about 15 seconds ago: since tags are case-sensitive, use CamelCase to indicate domain: +Work
or +Site
for example. We'll see how that works out!
And potentially useful tip: tasksh includes a nifty "review" feature for that weekly triage. I want to use it more. Ooh I could blog about it.
From official documentation
> purge 2.6.0 Completely removes tasks, rather than change status to deleted
And as you can see from this screenshot - the dummy task 'buy milk' that I created is saved in the list of completed tasks forever with a 'C' flag but I should be able to remove it from the list using purge
.
Honestly I don’t know if that is possible but not that I’m aware of. You could accomplish that using the on-add hook though by modifying the task before it is saved Check out the hooks docs: https://taskwarrior.org/docs/hooks.html
It is unfortunately poorly advertised, but you can even create this is an alias within taskwarrior:
task config alias.meet "add +meeting wait:due"
And then use it as
task meet "Bring up design ..."
https://taskwarrior.org/docs/terminology.html#alias
For this I would use the wait date. The next report should filter the waiting stuff for you. If you’ve never used wait then it’s one of taskwarriors best features in my opinion https://taskwarrior.org/docs/using_dates.html
When your run 'task' it defaults to the list report. You can see the configuration for the list report:
task show report.list
You'll see that sorting for that report is
start-,due+,project+,urgency-
This appears to be the kind of problem the Hooks API was created to solve.
https://taskwarrior.org/docs/hooks.html
You would need to write a pair of hooks, one for on-add and one for on-modify that checks if the task being added/modified had a certain project, and if so change its priority accordingly.
Alternatively, if you are just looking to boostvtge urgency of everything with a certain project, it might make more sense to give the project an urgency modifier in .taskrc.
I think that can be done with a line like: urgency.project.myproject.coefficient 3.0
But I have only ever done it with tags.
The desktop (taskserver) is where you generate all the certs, then you will transfer the certs to the laptop (taskwarrior client) and configure your .taskrc there.
Hang in there, it's not easy. Later when you go to troubleshoot the sync I find the bottom part of the troubleshooting sync handy (re: debug flags)
the way recurrence works in taskwarrior is that for every recurring task that is added, two tasks are generated: 1) The template/parent task which serves as a generator of recurring tasks, 2) the first instance of that recurring task.
due is the late possible date the task needs to be done before. So if you want to do something tomorrow it would be due end of the day tomorrow or the next day.
I stated using durations for assigning due dates.
eg. due:1d
or due:2d
Not sure if it will work, but after reading this:
>Relative Date
>
>There is indirect support for durations everywhere that a date value is >expected. For example, here is a task due in two days:
>
>$ task add Birthday party due:2days
>
>Whenever Taskwarrior expects a date (due date in this example) but >instead finds a duration, it is interpreted as a relative duration >added to the current date/time, in this example now + 2days.
I would imagine that the following should work (assuming your event is next Sunday:
$ task due:2019-12-08 recur:35d add The sunday event
Please, let us know if it works, u/kaotic (:
You could also set up a context to filter out your project based on a tag. This route allows you to switch back to another context to view your project when needed.
Taskwarrior does not provide any functionality that triggers based on currently active window. However, there are 3rd party tools that might do what you want. I would imagine that Activity-Wtch or Wakatime you listed above might be able to execute commands?
You can use "task 1 modify /from/to" to change only parts of your description.
https://taskwarrior.org/docs/commands/modify.html
There is also something called taskopen which allows you to link txtfiles to tasks. Though I would probably try to keep my descriptions a bit shorter and the maybe use annotations for more info
Did you ever get contexts working? Doesn't seem to work for me. With the context defined in the taskrc file, when I try to set the context via a command, the app basically freezes up. I am using this version of the app:
https://play.google.com/store/apps/details?id=kvj.taskw&hl=en_GB&gl=US