Overview

Automation for Jira app enables users to easily extend and implement automation in Jira without having to code.

This way, users can implement rules that are triggered upon some event, executed if certain condition(s) are met and, that perform certain action(s). 

Rules can also be triggered manually or may be scheduled.

Since Xray uses issue types for most of its entities and since Xray provides many JQL functions that allow you to obtain testing-related information, Automation for Jira can be used with Xray in a very straightforward way.


Automation rules are available and, can be created, from the project settings, namely from the "Automation" tab.


The following examples are provided as-is, no warranties attached; use them carefully.

Please feel free to adapt them to your needs. 

Note: We don't provide support for Automaton for Jira; if you have doubts concerning its usage, please contact Automation for Jira's support.



Usage Examples

Trigger a Jenkins project build from an issue

In this very simple scenario, we'll implement a rule, triggered manually, that will trigger a Jenkins project/job. The action will be available from within the "More" menu, in all issues of the selected project.

We're assuming that:


Jenkins configuration

In Jenkins, we need to generate an API token for some user, which can be done from the profile settings page.

 

At the project level, we need to enable remote build triggers, so we can obtain an "authentication token" to be used in the HTTP request afterwards.

The project itself is a normal one, without parameters.


Automation for Jira configuration

  1. create a new rule and define the "When" (i.e. when it to should be triggered ), to be "Manually triggered"

2. define an action (i.e. the "Then") as "Send webhook" and configure it as follows

After publishing the rule, you can go to the screen of an issue and trigger the Jenkins project/job.


Trigger a Jenkins project build from a Test Plan and report the results back to it

In this simple scenario, we'll implement a rule, triggered manually, that will trigger a Jenkins project/job. The action will be available from within the "More" menu, for all Test Plan issues of the selected project.

We're assuming that:


Jenkins configuration

In Jenkins, we need to generate an API token for some user, which can be done from the profile settings page.

 

At the project level, we need to enable remote build triggers, so we can obtain an "authentication token" to be used in the HTTP request afterwards.

The project itself is a normal one; the only thing relevant to mention is that this project is a parameterized one, so it receives TESTPLAN, that in our case will be coming from Jira.


Automation for Jira configuration

  1. create a new rule and define the "When" (i.e. when it to should be triggered ), to be "Manually triggered"

2. define the condition so that this rule can only be executed from Test Plan issue

3. define an action (i.e. the "Then") as "Send webhook" and configure it as follows

After publishing the rule, you can go to the screen of an issue and trigger the Jenkins project/job.

References