In Zoho Projects, you can automatically move a task from one task list to another when its status is updated. This keeps your tasks organised and ensures better visibility while reducing manual work.
For instance, during a product launch, the marketing team often organize the tasks into task lists such as "Commitments", "Delivered", and "On hold", etc to keep the workflow organized. Tasks such as Competitor Analysis and Audience Research are initially added to Commitments list with status set as Open.
When a task is completed and signed off, its status is updated to Delivered.
By executing a custom function, this status change automatically moves the task to the Delivered task list. This keeps the Commitments list focused on active work, while the Delivered list maintains the record of completed work.
To configure this flow,
- Navigate to the upper-right corner of the page and click
→ Developer Space → Connections.
- Create a new connection with the scope ZohoProjects.tasks.UPDATE.
3. Navigate to Custom Functions and under the
Task tab, create a new custom function and add the following
Deluge script.
Ensure that the portal URL aligns with your data centre. If not, the function may not execute as expected.
- if(taskListName.equalsIgnoreCase("Commitments"))
- {
- endPoint = "https://projects.zoho.in/restapi/portal/";
- toTasklistId = 389289000000177375;
- // Replace the tasklist id of "Delivered Tasks" above
- moveTaskParameter = Map();
- moveTaskParameter.put("from_todolist",fromTasklistId);
- moveTaskParameter.put("to_todolist",toTasklistId);
- moveTaskResponse = invokeurl
- [
- url :endPoint + portalId + "/projects/" + projectId + "/tasks/" + taskId + "/move"
- type :POST
- parameters:moveTaskParameter
- connection:"projects"
- ];
- info moveTaskParameter;
- info moveTaskResponse;
- }
- return "success";
Line 1: Replace "Commitments" with the task list that holds your active tasks.
Line 3: Update the toTasklistId with the ID of the task list where completed tasks should land.
Line 12: Replace "projects" with your connection name.
4. Add the arguments mentioned below.
5. Click Save and Execute.
6. Enter the Task ID when prompted.
Once the custom function is saved and executed without issues, you will have to associate it with a workflow rule.
7. Navigate to
in the upper right corner of the page.
8. Click on Automation → Workflow Rules → Projects Tab.
9. Click New Workflow Rule.
10. Configure the workflow to trigger Based on User Action and when a task is Updated.
11. Set the criteria as Task Status Is Delivered.
12. Click +Add Action and select Associate Custom Function.
13. Click Save Rule.
If the task status is updated in a task list and if the criteria matches with the rule, the task will be moved to another task list automatically.