Action: Create a Jira Ticket
In Cloudhouse Guardian (Guardian), you can configure actions to occur after certain events take place. For example, with a Jira integration, you could automatically create a ticket on a Jira board when a scan fails. This is useful if your team uses Jira to track issues that need to be addressed or triaged. You can configure this as an Action that automatically creates a Jira ticket every time a scan or policy fails in your Guardian instance.
Note: The following process assumes you have a Jira integration already configured in Guardian. For more information, see Jira Integration.
Tip: For an overview of actions in Guardian, including more options available to choose from, see Actions.
Action Settings
When configuring a Create a Jira Ticket action, the following settings are presented:
Setting | Description |
---|---|
Action Name field | A unique name for the action. This name is how you will identify this action among all others configured in your Guardian instance, so ensure it is descriptive. For example, 'New Policy Failure Jira Ticket' and not simply 'Failed Policy'. |
Summary field |
A brief summary of the event that triggered the action. What you enter here will be used in the Summary field of the resulting Jira ticket. To make your summaries dynamic, you can include variables in this field. Variables are pieces of text that Guardian will replace with relevant data. For example, you could use the variable |
Description field |
A detailed overview of the event that triggered the action. What you enter here will be used in the Description field of the resulting Jira ticket. As in the Summary field, you can use variables here to make your descriptions dynamic. |
Combine drop-down list |
The option to group similar Jira tickets together rather than creating a new ticket for each triggering event. Guardian is able to use the Summary field to recognize if two actions will result in the same Jira ticket being created. If you choose to combine tickets, only one ticket will be created for each unique Summary. All subsequent tickets resulting in the same Summary will either be added as a comment or a label to the original ticket. Note: Guardian will only combine tickets if the original ticket is still "open" in Jira. Guardian will not combine new tickets with tickets that have been closed. This drop-down offers the following options:
|
Comment (for combine) field (Optional) |
The comment to add to existing Jira tickets when combining of similar tickets occurs. Note: This field is only displayed if you selected 'Yes - Add comment' from the Combine drop-down list. |
Label (for combine) field |
The label to add to existing Jira tickets when combining of similar tickets occurs. Note: This field is only displayed if you selected 'Yes - Add label' option from the Combine drop-down list. |
Jira Integration drop-down list |
A list of all Jira integrations configured in your Guardian instance. When configuring a Jira integration, you designate a specific Jira URL and user for that integration. These are used to identify each Jira integration. From the drop-down list, select the Jira integration you want to use for this action. Once you make a selection here, the Jira Project and Ticket Priority drop-down lists appear with the selected integration's available options. |
Jira Project drop-down list |
A list of the Jira projects available as part of the selected integration. From the drop-down, select the project where you want your tickets to be created. Once you make a selection here, the Issue Type drop-down list appears with the selected project's available Jira issue types. |
Ticket Priority drop-down list | A list of the priority statuses that can be assigned to each Jira ticket. From the drop-down, select the priority you want to assign to tickets created by this action. |
Issue Type drop-down list |
A list of the issue types that can be assigned to each Jira ticket in your selected project. From the drop-down, select the issue type you want to assign to tickets created by this action. Note: This option is only displayed if you selected an project from the Jira Project drop-down list. |
Computed Status field (optional) |
The status in your Jira project you want to apply to tickets created by this action. For example, these tickets can be added directly to your Jira Backlog or to another status in your project like In-Progress. To set a status for your tickets, use the following syntax in this field: If left blank, new tickets are automatically sent to your Jira Backlog. |
Label field (optional) | A label to apply to new Jira tickets. If left blank, no label is applied. |
Other Fields text box (optional) |
Data you wish to use to populate any other fields relevant to your Jira tickets. You can use JSON in this text box to set the values in fields not present when configuring this action. For example, you could give each new ticket a default assignee with the following: Copy
In the above example, you would replace |
These settings are configured when adding a new action, and they can also be edited at any time through the Actions tab () and select Edit. Once you have made your edits, click Done to save them.
Add a Create a Jira Ticket Action
You can add a new Create a Jira Ticket Action action from any saved view in your Guardian instance. Each saved view represents a specific event determined using a query on the Events page. The saved view you select during this configuration determines the corresponding event that triggers your new action. For more information, see Saved Views.
To add a Create a Jira Ticket action, complete the following process:
Tip: For help completing any of the following fields, refer to their respective descriptions in the Action Settings table above.
-
Navigate to the Events tab (Control > Events).
-
Click the Saved Views button at the top of the page. The Saved Views side panel is displayed.
-
Select the event you want to trigger your new action. The saved view for that event is displayed.
-
Click the Actions tab to display all existing actions configured for this event.
-
Click the Add Action button. The Add New Action page is displayed.
-
Click Create a Jira Ticket. The required fields are displayed.
-
Enter an Action Name.
-
Enter a Summary.
-
Enter a Description.
-
From the Combine drop-down, select whether you want to combine similar Jira tickets. Then, enter either a Comment or a Label, depending on your selection.
-
Select a Jira Integration. Then, select a Jira Project, Ticket Priority, and Issue Type.
-
(Optional) Enter a Computed Status.
-
(Optional) Enter a Label.
-
(Optional) In Other Fields, enter a JSON body to define additional fields in your new Jira tickets.
-
Click Done.
Now, a confirmation dialog is displayed and you are redirected to the Actions tab for your selected saved view. Here, you can view your new action. To disable, edit, or test the action, click the Ellipsis () and select the appropriate option.