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
Currently, the on_progress and on_date_change events are triggered after a task has been updated. As such, the secod/third parameters, presumably containing the new values, are redundant (they are the same as their respective fields in the task object).
A fix for this would be to trigger the event before the update, or to create a new event that gets triggered before as opposed to after a change.
Additionally, the callbacks could return a true or false depending on if the change should continue. On a false, the task is reverted back to its state before starting the change.
Example:
If I want to implement a validation check for the new date (like not allowing a task to start on certain days, or not allowing any progress changes), I can't use the old values as part of that check or to revert the bar to it's previous state on a failure.
The text was updated successfully, but these errors were encountered:
Currently, the
on_progress
andon_date_change
events are triggered after a task has been updated. As such, the secod/third parameters, presumably containing the new values, are redundant (they are the same as their respective fields in the task object).A fix for this would be to trigger the event before the update, or to create a new event that gets triggered before as opposed to after a change.
Additionally, the callbacks could return a true or false depending on if the change should continue. On a false, the task is reverted back to its state before starting the change.
Example:
If I want to implement a validation check for the new date (like not allowing a task to start on certain days, or not allowing any progress changes), I can't use the old values as part of that check or to revert the bar to it's previous state on a failure.
The text was updated successfully, but these errors were encountered: