You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been experimenting with this hook, and it works well to shift the 'scheduled' attribute of a recurring task. It also implies that the 'wait' attribute needs to be shifted. However, as far as I can see, taskwarrior itself is already shifting the 'wait' attribute of a recurring task, with the result that this hook doesn't end up changing the value of the 'wait' attribute.
I did two different things to try to find out what was going on. One, I changed this line: time_attributes = ('wait', 'scheduled')
to this: time_attributes = ('scheduled',)
And all still worked as well as before. Both the wait and scheduled attributes advanced as expected.
Second, I added some print statements to the hook to show the before and after values of the attributes being changed:
for attr in time_attributes:
print attr
if parent[attr]:
print "Before: ", task[attr]
task[attr] = parent[attr] + parent_due_shift
print "After: ", task[attr]
That produced this output:
$ task
[task next]
Warning: You have specified that the 'wait' date is after the 'scheduled' date.
wait
Before: 2016-02-25 16:48:00-05:00
After: 2016-02-25 16:48:00-05:00
scheduled
Before: 2016-02-25 16:45:30-05:00
After: 2016-02-25 16:48:30-05:00
Creating recurring task instance 'Mow the lawn'
No matches.
Notice that the 'wait' attribute is the same before and after, while the 'scheduled' attribute is being adjusted.
Am I missing something? Or is it not necessary to use this hook to adjust the 'wait' attribute of a recurring task?
Thank you,
James
The text was updated successfully, but these errors were encountered:
I'm using taskwarrior 2.5.0.
I've been experimenting with this hook, and it works well to shift the 'scheduled' attribute of a recurring task. It also implies that the 'wait' attribute needs to be shifted. However, as far as I can see, taskwarrior itself is already shifting the 'wait' attribute of a recurring task, with the result that this hook doesn't end up changing the value of the 'wait' attribute.
I did two different things to try to find out what was going on. One, I changed this line:
time_attributes = ('wait', 'scheduled')
to this:
time_attributes = ('scheduled',)
And all still worked as well as before. Both the wait and scheduled attributes advanced as expected.
Second, I added some print statements to the hook to show the before and after values of the attributes being changed:
That produced this output:
Notice that the 'wait' attribute is the same before and after, while the 'scheduled' attribute is being adjusted.
Am I missing something? Or is it not necessary to use this hook to adjust the 'wait' attribute of a recurring task?
Thank you,
James
The text was updated successfully, but these errors were encountered: