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.

    • Sticky Posts

    • 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,
    • 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-update Phase Status

      Hello Folks! You can auto-update your phase's status based on status of underlying tasks using custom functions. In this series, we will showcase how to create and run custom functions, using Deluge, with ease. Follow the steps below and automate your
    • Automate Timesheet Approvals with Multi-level Approval Rules

      Introducing Approval Rules for Timesheets in Zoho Projects. With this automation, teams can manage how timesheets are reviewed and approved by setting up rules with criteria and assigning approvers to handle submissions. Timesheet, when associated to
    • Accessibility Spotlight Series - 1

      Every user interacts with products differently, what feels intuitive to one may be challenging for another. Addressing this, accessibility is built into Zoho Project's design philosophy. This helps users navigate and perform actions with ease irrespective
    • Recent Topics

    • How to compare a subform lookup field that allows multiple entries when edited

      I have a form with a subform with multiple fields. One of the fields is a lookup field that allows a multi select. On edit validation, I want a workflow to execute only when the entries in that subform field has changed. The old. function is not working
    • Zoho → ShipStation Integration – Sales Order–Driven Fulfilment Workflow

      Hello All, I’m reaching out to explore the best way to integrate a shipping tool into our inventory which will speed our process up. We are looking to integrate ShipStation into our existing order-to-fulfilment workflow, as we’re keen to standardise on
    • Facebook follower count doesn't match FB Analytics

      Hi all, I am wondering if anyone else has issues with follower counts for Facebook not matching FB's native analytics tool. On the Zoho dashboard, it's showing 1,007, but FB shows 1,060. All the other channels match up. Any insights are much appreciated!
    • Unable to mass update a picklist field

      Hello, I have the records within our Accounts module divided between two account types: Parent Accounts & Member Accounts. I am attempting to mass update accounts from one picklist value to the other (within other specific criteria in our custom fields)
    • Meta and Facebook data report discrepancy

      I have been currently gathering manually facebook follower data thru meta. In zoho marketing plus the social media reporting only allows for page likes, and so there is a discrepancy with the data. please the difference in files attached. Is there way
    • Business Day Logic Update: More Accurate Scheduling for Your Workflows

      Hello everyone, We’re improving how business-day calculations work in workflows, especially when triggers happen on weekends. This update ensures that offsets like +0, +1, and +2 business days behave exactly as intended, giving you clearer and more predictable
    • Develop and publish a Zoho Recruit extension on the marketplace

      Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
    • Unlocking New Levels: Zoho Payroll's Journey in 2025

      Every year brings its own set of challenges and opportunities to rethink how payroll works across regulations and teams. In 2025, Zoho Payroll continued to evolve with one clear focus: giving businesses more flexibility, clarity, and control as they grow.
    • Can I export all attachments from Zoho CRM?

      Can I export all attachments from Zoho CRM?
    • Please can the open tasks be shown in each customer account at the top.

      Hi there This has happened before, where the open tasks are no longer visible at the top of the page for each customer in the CRM. They have gone missing previously and were reinstated when I asked so I think it's just after an update that this feature
    • What's new in Zoho Sheet: Simplify data entry and collaboration

      Hello, Zoho Sheet community! Last year, our team was focused on research and development so we could deliver updates that enhance your spreadsheet experience. This year, we’re excited to deliver those enhancements—but we'll be rolling them out incrementally
    • 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
    • Community Digest — Noviembre y Diciembre 2025

      ¡Hola, Comunidad de Zoho en Español! Cerramos el año de la mejor forma con nuestro último Community Digest de 2025, donde podrás encontrar las últimas novedades de nuestros productos. ¿Todo listo para empezar 2026 con el mejor pie? ¡Vamos a ello! Zoho
    • Passing the CRM

      Hi, I am hoping someone can help. I have a zoho form that has a CRM lookup field. I was hoping to send this to my publicly to clients via a text message and the form then attaches the signed form back to the custom module. This work absolutely fine when
    • Zoho Projects Plus’ 2025- the year we launched

      We’ve been building project management tools for the past 19 years, and a question we often hear is: Different teams in our organization prefer different project management methods; while the development team prefers agile, the marketing and sales teams
    • Why can't we change the Account type from an Expense to an Asset?

      Like the question. Why in QuickBooks for example if I mistakenly created an account as an expenses and I already captured information in those accounts, I can just change the account type from expense to asset
    • Move email between inboxes?

      Is it possible to move emails from one team inbox to another? We would like to be able to have a single "catch-all" inbox for incoming requests, and then move the email to the appropriate department inbox. I was hoping we would be able to accomplish this
    • Zoho Books emails suddenly going to Spam since 11 Nov 2025 (Gmail + now Outlook) — anyone else?

      Hi everyone, We migrated to Zoho Books in July 2025 and everything worked fine until 11 Nov 2025. Since then, Zoho Books system emails are landing in customers’ Spam (first Gmail, and now we’re seeing Outlook/Office 365 also starting to spam them). Impacted
    • Default Tagging on API-generated Transactions

      If one assigns tags to an Item or Customer, those tags get auto-populated in each line item of an Invoice or Sales Order when one creates those documents. However, if one creates the Sales Order or Invoice via the API (either directly coding or using
    • How do you print a refund check to customer?

      Maybe this is a dumb question, but how does anyone print a refund check to a customer? We cant find anywhere to either just print a check and pick a customer, or where to do so from a credit note.
    • Data Import | Zoho Analytics Custom Query Window Size

      Please increase the window size for the Custom Query Data Import. It's impossible to work with such a small query window.
    • Company Multiple Branch/ Location Accounting

      Hi All, anyone know whether company can maintain their multiple Branch Accounting in Zoho  Books. It will be chart of Accounts & Master Data will be same but different report available as per per Branch. Thanks & regards, Vivek +91 9766906737
    • Zoho Books Invoices Templates

      It would be really helpful to have more advanced features to customise the invoice templates in Zoho Books. Especially I´m thinking of the spacing of the different parts of the invoice (Address line etc.). If you have a sender and receiver address in
    • Zoho Tracking Image location

      So we've been having an issue with tracking email opens. Specifically in Gmail. Our emails are not that long either, maybe 4 sections of image/250 characters of text/button per section.  But all my test accounts I used via Gmail we're showing opens. But then come to find out the tracking image is at the very bottom of the email. So If the message is clipped (It always just clips our social icons on the bottom) and the user doesn't click the show more button it never tracks the open.  Looking at other
    • Support for Developing Zoho Recruit Extensions via Zoho Sigma

      Hi, I’m interested in building an extension for Zoho Recruit using Zoho Sigma. However, when I navigate to Sigma and attempt to create a new extension (via the "New Extension" option), Zoho Recruit does not appear as a listed service—only options like
    • Email Administrators! Join our tips & troubleshooting series

      Greetings to all the admins out there! This announcement is exclusively for you. As we step into the New Year, we’re excited to start a dedicated series of admin-specific tips curated to support you. These posts will help you overcome everyday challenges
    • Notes badge as a quick action in the list view

      Hello all, We are introducing the Notes badge in the list view of all modules as a quick action you can perform for each record, in addition to the existing Activity badge. With this enhancement, users will have quick visibility into the notes associated
    • Deprecation of the Zoho OAuth connector

      Hello everyone, At Zoho, we continuously evaluate our integrations to ensure they meet the highest standards of security, reliability, and compliance. As part of these ongoing efforts, we've made the decision to deprecate the Zoho OAuth default connector
    • Personalize your booking pages with Custom CSS

      Greetings from the Zoho Bookings team! We’re introducing Custom CSS for Zoho Bookings, designed to give you complete control over the look and feel of your booking pages. With this new feature, you can upload your own CSS file to customize colors, fonts,
    • Free Webinar : Unlock AI driven business insights with Zoho Inventory + Zoho Analytics

      Are you tired of switching between apps and exporting data to build customized reports? Say hello to smarter & streamlined insights! Join us for this exclusive webinar where we explore the power of the Zoho Inventory–Zoho Analytics integration. Learn
    • No OR Filter for Views with a Related Modules Criteria

      We would like to create a Deal View where the User can see all their deals. For that, we would need an OR to connect the criteria. One of the Fields is a "multiselect User", these (Related Modules Criteria) can only be Filter with an AND. Even between
    • Creating a Chart from a Report

      In Zoho Analytics, is it possible to create a chart from a Pivot View report? We are looking to use Zoho Analytics to replace Excel for Sales reports and would like to be able to show both the table and the chart together.
    • Import Function: ONLY update empty fields

      When setting up an import from a spreadsheet to CRM, there is a checkbox "Don't update empty values for existing contacts" (see screenshot below). While I see some limited benefit from this functionality, I think there should also be an "ONLY update empty
    • Sales IQ Chat Widget is Only Displaying Last Name

      Can anyone suggest why the widget is only displaying "last name"?! We have the latest version of the wordpress plugin installed. Thanks Thanks!
    • Free Webinar: Zoho Sign for Zoho Projects: Automate tasks and approvals with e-signatures

      Hi there! Handling multiple projects at once? Zoho Projects is your solution for automated and streamlined project management, and with the Zoho Sign extension, you can sign, send, and manage digital paperwork directly from your project workspace. Join
    • Begin the year with best practices in the Zoho Desk mobile app : Part 2

      In focus: Optimizing collaboration and supervision Let's begin 2026 with Part 2 of our tips series on driving your ticketing operations at your fingertips. In Part 1, we explored streamlining operations within tickets. This helped individuals at Omniserve
    • Process checklist in CRM

      Hi We've created a new sales process that I'm mapping into the CRM - issue I have is that some of the tasks / milestones I would like to capture require very simple tick box responses but there are quite a few under a variety of sub categories so I don't
    • Can we disable add to cart in Zoho Commerce?

      Hello, Our sales happen on the phone. During the call the customer is directed to our website to inspect the products together with the sales rep. So we need a way to present our inventory. I figured Zoho Commerce is a good fit for this use case. However we would have to disable the possibility to purchase products in the shop. Is that possible? Sunny regards, Artjom
    • Holidays - Cannot Enter Two Holidays on Same Day

      I have a fairly common setup, where part-time employees receive 1/2 day's pay on a holiday and full-time employees receive a full day's pay. Historically, I've been able to accommodate this by entering two separate holidays, one that covers full-time
    • How to update "Lead Status" to more than 100 records

      Hello Zoho CRM, How do I update "Lead Status" to more than 100 records at once? To give you a background, these leads were uploaded or Imported at once but the lead status record was incorrectly chosen. So since there was a way to quickly add records in the system no matter how many they are, we are also wondering if there is a quicker way to update these records to the correct "Lead Status". I hope our concern makes sense and that there will be a fix for it. All the best, Jonathan
    • Next Page