Zoho Project: Automate the process of cloning a Task on specific status update

Zoho Project: Automate the process of cloning a Task on specific status update

Hello Everyone,

Here we are again, filled with excitement to share yet another requirement that has been accomplished through the implementation of custom functions.

In general, a custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.

Requirement:-


One of our customers had a specific requirement to automatically clone the Task and move the cloned Task to a Tasklist in another project on specific status update.

For example, when Task A's status is updated to 'Approved' within Project A, Task A should be automatically duplicated and moved to a Tasklist in Project B.

Custom function code:

// TODO : Clone Task from one project to another project.
// Copy Task
projectsV3APIEndPoint = "https://projectsapi.zoho.com/api/v3";
copyTaskParamMap = Map();
copyTaskParamMap.put("no_of_instances","1");
copyTaskDetails = invokeurl
[
url :projectsV3APIEndPoint + "/portal/" + portalId + "/projects/" + projectId + "/tasks/" + taskId + "/copy"
type :POST
parameters:copyTaskParamMap
connection:"'xxxxxxxxx'"
];
info copyTaskDetails;
info "-------------------------------------";
// Move Task
projectsRestAPIEndPoint = "https://projectsapi.zoho.com/restapi";
moveTaskParamMap = Map();
moveTaskParamMap.put("from_todolist",tasklistId);
// TaskList ID in which the task is to be moved
moveTaskParamMap.put("to_todolist","1683929000004182021");
moveTaskDetails = invokeurl
[
url :projectsRestAPIEndPoint + "/portal/" + portalId + "/projects/" + projectId + "/tasks/" + taskId + "/move"
type :POST
parameters:moveTaskParamMap
connection:"'xxxxxxxxx'"
];
info moveTaskDetails;
info "-------------------------------------";
return "success";

Replace 'xxxxxxxxx' in the above code with the connection name and the destination tasklist Id (1683929000004182021) to which Task to be moved. Screenshot of the list of parameters to be mapped is attached for reference.
 
Our customer was able to capitalize on custom functions in Zoho Projects which allowed them to automate the process of cloning Tasks, reducing time consumption and in turn increasing their business productivity.

We hope you found this post useful. If you have any questions or wondering if your requirement could be met using custom functions, feel free to share them in the comments section below.
    • Related Articles

    • Zoho Thrive: A Closer Look at Zoho Thrive's Improved User Experience

      We are delighted to introduce the new and enhanced user interface of Zoho Thrive. This update is designed to make setting up and managing your affiliate and customer loyalty programs faster and easier. Let’s take a closer look at the major changes in ...
    • Zoho CRM: New Assignment Rules

      Zoho CRM is introducing a new feature to make assignment rules even more flexible and powerful. Administrators can now automate the assignment of records based on specific criteria. These criteria can be related to the fields in the record or the ...
    • Introducing Zoho Service Plus : A unified platform for customer service - Early Access for Partners

      We are excited to announce early access to Zoho Service Plus, a unified platform that brings together all of our customer service applications into a single platform. The early access program is exclusive only to partners. With Service Plus, manage ...
    • Zoho CRM - Q1 2024 update

      Automating actions in third-party tools has never been this easy When you think of third-party integrations, two things come to mind: plug-and-play integrations, where the system handles everything once you've enabled it, and more complicated ...
    • Zoho Apptics: Your Ultimate Solution for App Analytics

      Zoho announced Zoho Apptics, recognizing that in today’s hyper-connected world, the internet is not just a tool—it’s the backbone of our digital experiences, with mobile apps now dominating the majority of screen time. The times have changed, and ...