Closed Doctor-Andonuts closed 9 years ago
You are correct, we currently do not have public, documented to access the original values in the Task object.
That said, you can look into original values pretty easily by accessing the _original_data
dict:
task = Task.from_input()
if task._original_data['status'] is 'pending' and task['status'] is 'completed':
<do your stuff>
I'll leave this open as a reminder to wrap access to _original_data
data dict in a public property and document it in the docs.
Thanks you for the prompt response, this looks like exactly what I was looking for! This library makes it much easier to write hooks.
Fixed with: 80230e4e58118eaec09b0a83459b8543fbf78260
I would like to see if a task went from pending to completed (not just that it is completed because I do not want it to trigger if I modify an already completed task).
I am using
task = Task.from_input()
to collect the data but I do not see in the documentation how to compare or get values from the original task and compare them against the modified task. Perhaps you already have this implemented I didn't see how to do it.Thanks for your time.