When a project is planned, tasks are scheduled within the projects timeline. Any delay in the predecessor tasks can delay dependent tasks, which can in turn impact the project timeline. Unless the project is manually rescheduled, the end date might not align with the task time line. This leads to discrepancies in the project. With this automation, the project roadmap stays aligned with the task's due date while also notifying the owner in case of any changes to the schedule.
Let's consider an event management firm coordinating an Award Ceremony. Here multiple tasks can depend on the outcome of a single task for before they progress. For example, tasks such as Trophy Engraving and Certificate Printing are dependent on the Nominee Confirmation task. When the jury takes time to confirm the nominee, the dependent tasks linked are postponed as well.
As the delays cascade, the final task ends up exceeding the project end date. With this automation, the project end date is updated automatically and the project owner receives an email notification. This ensures task and project due dates stay accurate even when task timeline shifts, eliminating the need for manual rescheduling.
This automation applies to both manual task date updates and dependency-based shifts.
To configure this flow in your Zoho Projects portal,
1. Navigate to the upper-right corner of the page and click
→ Developer Space → Connections. 2. Click
Create Connection, choose Zoho Projects as the service, and add the following scope:
- ZohoProjects.projects.UPDATE
4. Click the
Tasks tab in the top panel.
5. Click on Create a new custom function and add the below Deluge script.
Ensure that the portal URL aligns with your data centre. If not, the function may not execute as expected.
- // scopes: ZohoProjects.projects.UPDATE
- endPoint = "https://projectsapi.zoho.in/api/v3/portal/";
- format = "dd-MM-yyyy";
- params = Map();
- if(taskDueDate != null && projectEndDate != null)
- {
- daysDiff = daysBetween(toDate(toString(taskDueDate,format)),toDate(toString(projectEndDate,format)));
- if(daysDiff < 0){
- params.put("end_date",toString(taskDueDate,"yyyy-MM-dd"));
- updateProjectResponse = invokeurl
- [
- url :endPoint + portalId + "/projects/" + projectId
- type :PATCH
- parameters:params.toString()
- connection:"projectdateupdate"
- ];
- sendmail
- [
- from :zoho.adminuserid
- to :projectOwner.get(0).get("email")
- subject :"Project End Date update in Zoho Projects!"
- message :"Hi, the " + projectName + " project end date has been updated to " + toString(taskDueDate,format)
- ]
- }
- }
- return "success";
- Line 2: Replace the domain like AU, EU, CN, IN etc.in the URL to match your data centre.
- Line 13: Replace "projectdateupdate" with your Zoho Projects connection name.
6. Add the following arguments during configuration.
7. Click Save.
8. Navigate to
→ Automation → Workflow Rules. 9. Click the Tasks tab in the top panel and click New Workflow Rule.
10. Select Based on User Action as the execution condition and execute the rule when a Task is Updated. Select Due Date from the dropdown.
11. Click +Add Action and select Associate Custom Function. Select the custom function created previously.
12. Click Save Rule.