The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to set the Audit Engagement to closed state without closing the related issues

KoteswaraMa
Tera Contributor

Hi Team, 

 

We have a requirement that how to close the audit engagement automatically without closing the related issues if any as they(all issues) will be tracked separately.

 

Observed a Business Rule "Auto-close if no issues or tasks" which automatically sets the engagement to closed state if there are no active tasks or issues. 

 

BR Script: 

var answer = new AuditUtils().hasOpenTasks(current.sys_id);
    if(!answer && GlidePluginManager.isActive('com.sn_audit_advanced')){
       answer = new sn_audit_advanced.AuditMilestoneUtils().hasOpenMilestones(current.sys_id);
    }
    if(!answer){
       current.state = 3;
    }
 
Here, it is calling AuditUtils script include which invokes the AuditUtilsBase, which in turn calls the hasOpenTasks function. This function checks for presence of active issues. Now, I wanted to understand the recommended best practice to achieve the requirement considering upgrade, and advanced audit if we enable it in future.
 
Any guidance or suggestions would be appreciated.

 

Thanks,

Majji

 

 

 

0 REPLIES 0