How to do it...

To create an automated action with a timed condition on tasks, follow these steps:

  1. In the Settings menu, select the Technical|Automation|Automated Actions menu item, and click on the Create button.
  2. Fill out the basic information on the Automated Actions form:
    • Rule Name: Send notification near deadline
    • Related Document Model: Task
    • Select Based on Time Condition in the Trigger Condition field
    • In Action To Do, select Execute several actions
  1. To set the record criteria, click on the Edit Domain button in the Apply on section. In the pop-up dialog, set a valid domain expression in the code editor, ["&",["date_deadline","!=",False],["stage_id.fold","=",False]], and click on the Save button. When changing to another field, the information on the number of records meeting the criteria is updated, and displays Record(s) buttons. By clicking on the records button, we can check the records list of the records meeting the domain expression.
  2. To set the time condition on the Trigger Date, select the field to use, which is Deadline, and set the Delay After Trigger Date to -1 Days.
  1. On the Actions tab, under Server actions to run, click on Add an item and pick Send Reminder from the list that should have been created previously. If not, we can still create the server action to run using the Create button, as shown in the following screenshot:
  1. Click on Save to save the automated action.
  2. Perform the following steps to try it out:
    1. Go to the Project menu, go to Search|Tasks, and set a deadline on a task with the date in the past.
    2. Go to the Settings menu, click on the Technical|Automation|Scheduled Actions menu item, find the Base Action Rule: Check and execute action in the list, open its form view, and press on the Run Manually button in the top-left. This forces timed automated actions to be checked now. This is shown in the following screenshot. Note that this should work on a newly created demo database, but might not work this way in an existing database:
  1. Again, go to the Project menu and open the same task you previously set a deadline date on. Check the message board; you should see the notification generated by the server action triggered by our automated action.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset