Bulk-close Jira issues with Cloudaware comments
This guide explains how to set up Jira automation to close issues that include Cloudaware comments. Cloudaware can post comments to Jira issues when certain conditions are met. Jira supports bulk closure of issues based on such comments.
Use case: A security team wants to bulk-close Jira issues if the related vulnerabilities are fixed and no further action is needed. Comments posted by Cloudaware, e.g., when a vulnerability is resolved, can act as triggers for this automation.
Prerequisites
Ensure that custom fields Object Type and Object Identifier are created and added to the issue layout in Jira.
Ensure that https://cloudaware.atlassian.net/wiki/spaces/DOCS/pages/4133453854 are configured and required fields are set.
Set up Jira automation
Note that the Jira action for Cloudaware comments must be set up before enabling this automation (see this guide).
Automatically change issue status to Resolved when Cloudaware posts a comment indicating a vulnerability is fixed.
In the Service Desk project, go to Project settings → Automation.
Open the Rules tab → click Create rule.
Configure the rule by defining the WHEN, IF, and THEN blocks:
3.1. Add a trigger for WHEN block. Select Issue commented → select Comment is the main action → click Next.
3.2. Add the IF block. Choose the component {{smart values}} condition:
Set up the criteria as follows:
First value:{{comment.body}}
Read more about triggers
Condition: contains
Second value:"This vulnerability is fixed and deleted on"*
Click Next.3.3. Add the THEN block. Select Transition issue → RESOLVED for Destination Status → click Next.
The automation summary should look as follows:
Click Turn on rule → name the rule → click Turn on rule to enable the automation.