Task is modified and now meets the conditions

From Planfix
Jump to: navigation, search

A script with the event Task is modified and now meets the conditions works as follows:

  • for each task change, the system checks whether the condition was met last time for this script in this task and whether it is being met at the moment;
  • if the condition was not met before but is now, the script is triggered, and the actions added to it are executed.

Important

For the script to be triggered as expected, a simultaneous combination of two factors is necessary: task is modified and the condition in the task, which was not previously met, has to be met. If these two factors are separated in time, the script may not be triggered when you expect it.

Therefore, we do not recommend using conditions in scripts for the event "Task is modified and now meets the condition" that is unrelated to this task's fields. For example, conditions for the parent task, fields of the counterparty, or system features like "Event triggered by another script."

  • Example (what not to do) №1:

GlHCam.jpg

  • If the status in the parent task changes to "Payment," the script will not work, as the task has not changed.
  • however, if the task changes, the script will be triggered because both factors are present - the task has changed, and the condition "Status of parent task = Payment" is now met (and was not met when the task was last modified).
  • Example (what not to do) №2:

8rbxnj.jpg

  • If the task status is changed to "Not specified" by another script, this script does not work because condition 2, "Event triggered by another script = No," is not met;
  • however, as soon as a field in the task is changed manually, this script is triggered because the status has changed since the last task change and now meets the condition "Task status = Not specified."

Be careful and only use conditions for the fields of the current task for this event.


Go To