Power of Automation :: Automatically close the associated tasks once the Issues are closed

Power of Automation :: Automatically close the associated tasks once the Issues are closed

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

We have compiled a gallery of the most frequently solved use cases for Issues custom functions. You can access the same using the steps available in this link.        

And, today I would like to highlight one of the Gallery custom functions - Complete associated tasks once all issues are closed
 
Use case:-

This function marks all the associated tasks as completed once all related issues are closed.

Custom function code:-

Create a connection for the Zoho Projects service with the scopes "ZohoProjects.bugs.READ, ZohoProjects.tasks.UPDATE,ZohoProjects.projects.READ". Replace 'xxxxxxxxx' with the connection link name.

Click this link below to learn how to create the connection. Attached a screenshot for Arguments to be used.
projectsDomain = "https://projectsapi.zoho.com";
getAssociatedTasksUrl = projectsDomain + "/api/v3/portal/" + portalId + "/projects/" + bugProjectId + "/bugs/" + bugId + "/associated-tasks";
getAssociatedTasksParam = Map();
getAssociatedTasksParam.put("sindex","0");
getAssociatedTasksResp = invokeurl
[
url :getAssociatedTasksUrl
type :GET
parameters:getAssociatedTasksParam
connection:"xxxxxxxxxx"
];
info getAssociatedTasksResp;
if(getAssociatedTasksResp != null && getAssociatedTasksResp.get("task_array") != null)
{
getTaskLayoutUrl = projectsDomain + "/restapi/portal/" + portalId + "/projects/" + bugProjectId + "/tasklayouts";
taskLayoutDetails = invokeurl
[
url :getTaskLayoutUrl
type :GET
connection:"xxxxxxxxxx"
];
info taskLayoutDetails;
info "-------------------------------------";
statusNamevsIdMap = Map();
if(taskLayoutDetails != null && taskLayoutDetails.get("status_details") != null)
{
statusDetails = taskLayoutDetails.get("status_details");
for each  status in statusDetails
{
statusNamevsIdMap.put(status.get("name"),status.get("id"));
}
}
info "Status NamevsId Map: " + statusNamevsIdMap;
taskArrays = getAssociatedTasksResp.get("task_array");

if(statusNamevsIdMap.get(statusName) != null)
{
for each  taskObj in taskArrays
{
taskId = taskObj.get("TID");
criteriaObj = Map();
criteriaObj.put("cfid","48");
criteriaObj.put("criteria_condition","is");
criteriaObj.put("value",{taskId});
filterCriteria = Map();
filterCriteria.put("criteria",{criteriaObj});
filterCriteria.put("pattern","1");
getTaskAssociatedIssuesParam = Map();
getTaskAssociatedIssuesParam.put("index","0");
getTaskAssociatedIssuesParam.put("range","25");
getTaskAssociatedIssuesParam.put("sort_by","CREATED_TIME");
getTaskAssociatedIssuesParam.put("is_ascending","false");
getTaskAssociatedIssuesParam.put("filter",filterCriteria);
getTaskAssociatedIssuesUrl = projectsDomain + "/restapi/portal/" + portalId + "/projects/" + bugProjectId + "/module/bugs/view/48/";
getTaskAssociatedIssuesRes = invokeurl
[
url :getTaskAssociatedIssuesUrl
type :GET
parameters:getTaskAssociatedIssuesParam
connection:"xxxxxxxxxx"
];
info getTaskAssociatedIssuesRes;
bugEntities = getTaskAssociatedIssuesRes.get("data").get("0").get("entities");
completeTask = true;
for each  bug in bugEntities
{
if(!bug.get("is_completed"))
{
completeTask = false;
break;
}
}
if(completeTask)
{
updateTaskParameter = Map();
updateTaskParameter.put("custom_status",statusNamevsIdMap.get(statusName));
info "updateTaskParameter: " + updateTaskParameter;
taskDetails = zoho.projects.update(portalId,bugProjectId,"Tasks",taskId,updateTaskParameter,"xxxxxxxxxx");
info taskDetails;
}
}
}
}
We hope you found this post useful. If you have any questions, feel free to share them in the comments below.

    Access your files securely from anywhere


            All-in-one knowledge management and training platform for your employees and customers.






                                  Zoho Developer Community




                                                        • Desk Community Learning Series


                                                        • Digest


                                                        • Functions


                                                        • Meetups


                                                        • Kbase


                                                        • Resources


                                                        • Glossary


                                                        • Desk Marketplace


                                                        • MVP Corner


                                                        • Word of the Day


                                                        • Ask the Experts



                                                                  • Sticky Posts

                                                                  • Improve User Onboarding in Zoho Projects with Zoho DAP

                                                                    Rolling out new processes or onboarding new users in the tool comes with a familiar challenge: the employees need guidance at the moment they are doing the work. Traditional training sessions and knowledge sharing often require users to leave the application.
                                                                  • Introducing the Zoho Projects Learning Space

                                                                    Every product has its learning curve, and sometimes having a guided path makes the learning experience smoother. With that goal, we introduce a dedicated learning space for Zoho Projects, a platform where you can explore lessons, learn at your own pace,
                                                                  • Create Custom Module Using AI in Zoho Projects

                                                                    Every team has its own way of managing work. While standard modules support common project management needs, many business processes require their own structure, fields, and terminology. With AI-powered Custom Modules in Zoho Projects, users can create
                                                                  • Update on V2 API End-of-Life Timeline

                                                                    Dear Users, Earlier this year, we shared the launch of the V3 APIs and requested users to migrate from the older V2 APIs by December 2025. We have received valuable feedback from our users and partners regarding their migration timelines. We are happy
                                                                  • Automation Series: Auto-assign Task Followers

                                                                    As task progresses, several users are required to stay aware of the updates to plan their upcoming work items efficiently. Manually adding users as followers for an active task might create additional overhead. With this automation, followers can be added


                                                                  Manage your brands on social media



                                                                        Zoho TeamInbox Resources



                                                                            Zoho CRM Plus Resources

                                                                              Zoho Books Resources


                                                                                Zoho Subscriptions Resources

                                                                                  Zoho Projects Resources


                                                                                    Zoho Sprints Resources


                                                                                      Qntrl Resources


                                                                                        Zoho Creator Resources



                                                                                            Zoho CRM Resources

                                                                                            • CRM Community Learning Series

                                                                                              CRM Community Learning Series


                                                                                            • Kaizen

                                                                                              Kaizen

                                                                                            • Functions

                                                                                              Functions

                                                                                            • Meetups

                                                                                              Meetups

                                                                                            • Kbase

                                                                                              Kbase

                                                                                            • Resources

                                                                                              Resources

                                                                                            • Digest

                                                                                              Digest

                                                                                            • CRM Marketplace

                                                                                              CRM Marketplace

                                                                                            • MVP Corner

                                                                                              MVP Corner









                                                                                                Design. Discuss. Deliver.

                                                                                                Create visually engaging stories with Zoho Show.

                                                                                                Get Started Now


                                                                                                  Zoho Show Resources

                                                                                                    Zoho Writer

                                                                                                    Get Started. Write Away!

                                                                                                    Writer is a powerful online word processor, designed for collaborative work.

                                                                                                      Zoho CRM コンテンツ




                                                                                                        Nederlandse Hulpbronnen


                                                                                                            ご検討中の方





                                                                                                                      • Recent Topics

                                                                                                                      • Introducing Microsoft Word Integration in Zoho Contracts

                                                                                                                        We are excited to announce a new feature that brings contract authoring and negotiation in your familiar environment — the Microsoft Word Integration. What This Integration Brings The Microsoft Word Integration connects Zoho Contracts with the Microsoft
                                                                                                                      • Share Video Response Card ion Zobot

                                                                                                                        I am using the zobot codeless bot builder in SalesIQ. I want to share a video but delay the next response card until after the video has finished playing or has been stopped. Is this possible?
                                                                                                                      • Customer image field

                                                                                                                        I created a custom image field for estimates, and it works as expected. The only issue I have is that I want to be able to place the custom image field in the estimate invoice. Is there a way I can do that, the field does not give the option to display
                                                                                                                      • Sub Folders

                                                                                                                        It would be great if there could be sub-folders in reports. We have a ton of individual reports and folders that would be easier to navigate this way 
                                                                                                                      • Goals API - Zoho People

                                                                                                                        Hi Team, I would like to get the API details for retrieving organisation-wise Goals from Zoho People. Currently, I am able to retrieve individual employee goals using the following API: https://people.zoho.com/api/v3/performance/goal/{emp_id} However,
                                                                                                                      • Question and responses disapear

                                                                                                                        I have a form where several people have had issues where the questions, responses or submission simply disappear when trying to complete the form. It seems to be random with no pattern of question, browser or OS. Hopefully there is a fix in the platform
                                                                                                                      • Unable to send message;Reason:553 Relaying disallowed. Invalid Domain

                                                                                                                        Hi, Now when I try to reply to an email, I see the Unable to send message;Reason:553 Relaying disallowed. Invalid Domain voicemessagedownloader.com error. I tested sending an email when I set it up in the past and it worked. I have checked the Zoho Organization
                                                                                                                      • Guide customers to the right booking page with routing forms

                                                                                                                        Greetings from the Zoho Bookings team! We're excited to introduce Routing Forms in Zoho Bookings. Routing forms let you collect information from customers before they schedule an appointment and automatically direct them to the most appropriate booking
                                                                                                                      • Analytics Dashboard User Filters Default Value

                                                                                                                        User Filters on Dashboard do not allow Unknown to be set as a default filter value. I have to include NULL values in my dashboard among other values but I can't include NULL/Unknown by default in Dashboard User Filters.
                                                                                                                      • Horrible download speed

                                                                                                                        Using a trial of Zoho Assist and downloading a 316 MB file on a 500/500 fibre connection to a remote computer on the same network took 7 mins to complete. On AnyDesk it took 1 min or so.
                                                                                                                      • How to Backup Zoho to PST?

                                                                                                                        I'm looking for a simple way to backup Zoho Mail emails to PST format. I tried the IMAP method with Outlook, but it seems slow and complicated for large mailboxes. I need a solution that can: Export Zoho emails to PST Preserve attachments and folder hierarchy
                                                                                                                      • Frustrated with Zoho Assist QuickSUpport

                                                                                                                        Trialling Zoho Assist and I have a variety of clients. A lot are computer illiterate. Some have poor vision. The current support sessions are using apps which have desktop icons for the appropriate apps. I either connect on demand then the client approves
                                                                                                                      • Zoho Books | Product updates | August 2026

                                                                                                                        Hello users, July has been an exciting month for Zoho Books! This month, we're excited to introduce HTML PDF Templates, Placeholders as Pills, expanded approval workflows for Sales Returns and Journals, and significant compliance updates across the India,
                                                                                                                      • Action required: WhatsApp now uses BSUID as the primary identifier

                                                                                                                        Important If your support team uses WhatsApp to engage with customers, there is an important platform change you need to know about. BSUID support is now mandatory for all WhatsApp Business Platform partners and businesses. WhatsApp is introducing usernames,
                                                                                                                      • Tip #83- Give Customers a Faster Way to Reach You with the Quick Support Plugin – 'Insider Insights'

                                                                                                                        Hello Zoho Assist Community! Think about the last time a customer needed urgent support. They emailed in, waited for a response, got a session link, couldn't find it in their inbox, called back, and by the time the session actually started, a good chunk
                                                                                                                      • Final Notice: Migrate Your ASAP Mobile SDK by August 31

                                                                                                                        Alert August 31, 2026 is the deadline. After this date, older ASAP Mobile SDK versions will no longer work with the ASAP Help Widget. If your app hasn't been migrated to a supported SDK version, users will no longer be able to access the ASAP Help Widget
                                                                                                                      • Approval Process configuration is now more flexible and fully customizable

                                                                                                                        Hello everyone! Zoho CRM's Approval Process is back with a better user experience that makes it easier to add rules to your processes. This enhancement includes some UI updates that help you create highly structured approval stages—and more. Let's look
                                                                                                                      • Kaizen #255 - Building a Real-Time Operational Dashboard with Zoho CRM Queries

                                                                                                                        Hello Everyone, Welcome back to another edition of the Kaizen series, where we uncover powerful ways to extend and customize Zoho CRM. In the previous Query Kaizens, we explored how Queries can retrieve CRM data, invoke REST APIs, and even update CRM
                                                                                                                      • 【Zoho CRM】キオスクに「ループ機能」が追加|同じ処理を繰り返し実行可能に

                                                                                                                        ユーザーの皆さま、こんにちは。 コミュニティグループの中野です。 Zoho CRMのキオスクに、同じ処理を繰り返し実行できる「ループ機能」が追加されました。 これまでは、同じ処理を複数回実行したい場合、同じ設定を繰り返し作成する必要がありました。 ループ機能を使うと、処理を一度設定するだけで、指定した回数や 取得したデータ数に応じて自動的に繰り返すことができます。 目次 ループ機能とは 設定方法 注意点 1. ループ機能とは ループ機能を使うと、キオスク内の画面や処理を指定した条件に応じて繰り返し実行できます。
                                                                                                                      • Es posible cambiar el lenguaje de los modulos del ASAP?

                                                                                                                        Es posible cambiar el lenguaje de estos textos? Tengo Zoho configurado en español pero aun así me muestra estos textos en ingles:
                                                                                                                      • Where do I edit the "Welcome to [portal name]" message

                                                                                                                        I am looking for a way to edit the "Welcome to" part of the message that is seen on the landing page (ex: https://help.zoho.com/portal/en/home). When I use the French interface, it doesn't make sense... I want to change it from "Bienvenue chez" to" Bienvenue au". Thanks!
                                                                                                                      • Zoho ERP | Product updates | July 2026

                                                                                                                        Hello users, We're back with another round of updates to help you streamline your operations. This month's release brings new features and enhancements designed to help you work more efficiently. Read on to discover everything that's new in Zoho ERP this
                                                                                                                      • Automate Backups

                                                                                                                        This is a feature request. Consider adding an auto backup feature. Where when you turn it on, it will auto backup on the 15-day schedule. For additional consideration, allow for the export of module data via API calls. Thank you for your consideration.
                                                                                                                      • Shared Snippets Everyone

                                                                                                                        Hi, Now that the Shared Snippets have been released and I think will be the most used feature implemented in 2023 :) Creating and Using Snippets in Ticket Responses - Online Help | Zoho Desk Maintain consistency in ticket responses with shared snippets
                                                                                                                      • Multi-currency and Products

                                                                                                                        One of the main reasons I have gone down the Zoho route is because I need multi-currency support. However, I find that products can only be priced in the home currency, We sell to the US and UK. However, we maintain different price lists for each. There
                                                                                                                      • Remove "Subject" as a required field on quotations

                                                                                                                        Not sure why, but Zoho has made 'Subject' a system defined required field. I'm not entirely sure why subject would be required as a key field (i.e. you cannot deactivate it or change it from required). It doesn't make much sense on many product quotations,
                                                                                                                      • Displaying only unread tickets in ticket view

                                                                                                                        Hello, I was wondering if someone might be able to help me with this one. We use filters to display our ticket list, typically using a saved filter which displays the tickets which are overdue or due today. What I'd really like is another filter that
                                                                                                                      • Best way to setup Inventory bin tracking for products with multiple boxes/crates

                                                                                                                        Hi - we need some advice from the community on setting up Items in the Inventory for products with multiple crates. We have large products in our warehouse where the product is delivered as two large (double pallet) crates. We've setup the Items for these
                                                                                                                      • Can't find field from ZCRM for a trigger

                                                                                                                        Hello, Currently I am revamping our CRM system and we have created second layouts from to try out new processes while not disrupting the old one. Moreover, we want to use different layouts for different processes. The issue is that when creating the ZCRM
                                                                                                                      • Discount Per Item / Option Removed

                                                                                                                        Hi, I was using Zoho Books for three years now and very saticfied. Now, as we try to add an invoice, we founds that the discount option per item was takn away, and a discount from total was implemented. However, we have cases when we add a diffrent discount to each item. Was this option removed permanently? Thanks, 
                                                                                                                      • Any Possible to change the challan type in Delivery challan ?

                                                                                                                        Hello Team, We need to add the more values in challan type in delivery challan module in Zoho Books.So how to add additional values in challan type field. Please find following snap for your reference. Thanks in Advance, Thisai Moorthy.
                                                                                                                      • Show when an invoice has been viewed

                                                                                                                        It would be nice to know if/when a customer has viewed an invoice. This would mean not having PDF attachments and just have the link to the invoice. My previous invoicing solution had this feature and I did not realize how much I used it until it was gone. Would this be possible, or this already available and I am just missing it?
                                                                                                                      • Zoho Books | Product updates | March 2026

                                                                                                                        Hello users, We’ve rolled out new features and enhancements in Zoho Books. From Advanced Reporting Tags to the ability to mark projects as completed, explore the latest updates designed to improve your bookkeeping experience. Introducing Advanced Reporting
                                                                                                                      • Separator line

                                                                                                                        Is there a way i can insert a line in an invoice or quote without showing qty or prices? e.g. Options I Item description qty and price Option II Item description qty and price Thanks
                                                                                                                      • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

                                                                                                                        Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
                                                                                                                      • BCC Drop Box Centralisation

                                                                                                                        Hi Team, For the last few years, I have had a question related to the Zoho CRM BCC Dropbox feature. Although BCC Dropbox is very useful for tracking customer email communication, I have always wondered why its configuration is managed at the individual
                                                                                                                      • Kiosk Page Refresh

                                                                                                                        We have a Kiosk running from a button in contacts to update values and also add related lists, which works great, but when the kiosk is finished the page does not refresh to show the changes. Is there a way to force the contact to refresh/update when
                                                                                                                      • CRM Integration - Option to Sync Reporting Tags

                                                                                                                        It would be nice to be able to sync reporting tags in Zoho Finance to a custom field in Zoho CRM. My use case is for a Customer in Finance to an Account in CRM (and vice-versa, of course), but I'm sure it's pretty obvious that this could also be used
                                                                                                                      • Join the Zoho Desk Virtual Classroom Training (VCRT)

                                                                                                                        Hello everyone, Have you heard about Zoho's Virtual Classroom Training (VCRT)? Zoho Desk's Virtual Classroom Training offers end-to-end training for Zoho Desk users. Join the VCRT and get hands-on guidance for setting up Zoho Desk and getting your business
                                                                                                                      • Make Rich Text fields available in Canva Print Views

                                                                                                                        Everything is on the title. I don't really understand why this is not already possible as Rich Text Fields are available in Canva Detailed Views for example.
                                                                                                                      • Next Page