Jira for Workflows
Your Dynatrace environment can integrate with a Jira Cloud or Server instance. With this integration, you can automate creating, commenting, and assigning Jira issues on the events and schedules defined for your workflows.
Set up Jira integration
To use Jira workflow actions, you first need to install the Jira for Workflows app from Dynatrace Hub.
- In Dynatrace Hub
, search for Jira for Workflows.
- Select the Jira for Workflows app and select Install.
After you install Jira for Workflows, you need to perform some initial steps to set up the connection between Jira and your Dynatrace environment.
Allow Jira for outbound connections
Grant permissions to Workflows
Authorize connection to Jira
Allow Jira for outbound connections
- Open the Settings app and go to Preferences > Limit Outbound Connections.
- Select Add item and add the domain of your publicly accessible Jira instance. For example,
*.atlassian.net
can be added if the Jira for Workflows actions should connect to a Jira Cloud instance. - Select Save changes.
This way, you can granularly control the web services to which your Dynatrace environment can connect.
Grant permissions to Workflows
Some permissions are required by Workflows to run actions on your behalf. Other permissions are required by actions that come bundled with Jira for Workflows itself.
To fine-tune permissions granted to Workflows
- Open Workflows and go to Settings > Authorization settings.
- Make sure the following permissions are selected.
- Permissions needed for Workflows
app-engine:functions:run
- Permissions needed for Slack workflow actions:
app-settings:objects:read
state:app-states:read
state:app-states:write
state:app-states:delete
- Permissions needed for Workflows
Authorize connection to Jira
- Get credentials for the Jira instance. The following authentication methods are supported:
-
Basic Authentication
We don't recommend using the basic authentication scheme, but it may still be required to authenticate older Jira Server versions that don't support the personal access token.
-
Personal Access Token (PAT) recommended
This is the recommended method to use for Jira Server. To learn which versions of Jira Server support personal access tokens and how you can create them, see Using personal access tokens in the Atlassian Jira documentation.
-
Jira API Token (Jira Cloud)
When connecting to a Jira Cloud instance, use the Jira API tokens.
-
- Return to Dynatrace, open Settings, and go to Dynatrace apps > Jira Connections.
- Select Add item and provide a name, the URL of the Jira instance, and—depending on the type of the credentials—either a username/password or simply a token.
- Save your changes.
Create Jira issues with workflows
-
Open Workflows
and select
to create a new workflow.
-
In the side panel, select the trigger best suited to your needs.
-
On the trigger node, select
to browse available actions.
-
In the side panel, search the actions for Jira for Workflows and select Create Issue.
-
Select a preconfigured Jira connection.
-
Select a Jira project.
-
Select an issue type.
-
Optionally, select values for fields such as priority, assignee, reporter, labels, and components.
Not all fields support workflow expressions and some fields depend on others. For example, the priority cannot be set if the issue type is unknown.
-
Enter summary text.
-
Enter a description for the Jira issue.
Format your message using Jira Markdown. You can also use workflow expressions as input for the description.
-
To test your workflow, select Run.
If fields are missing or you are unable to create an issue, see Missing required fields or custom fields in the Troubleshooting section.
Action result
The Create Issue action provides the following result:
Property | Description |
---|---|
| The numeric ID of the newly created Jira issue (for example, |
| The Jira issue key of the newly created Jira issue (for example, |
| A URL that links to the newly created Jira issue (for example, |
Note: This result can be used as inputs for other workflow actions via workflow expressions.
Transition issue
-
Open Workflows
and select
to create a new workflow.
-
In the side panel, select the trigger best suited to your needs.
-
On the trigger node, select
to browse available actions.
-
In the side panel, search the actions for Jira for Workflows and select Transition issue.
-
Set Connection to a preconfigured Jira connection.
-
Set Project to the appropriate Jira project for the issue to be provided.
-
Set Issue type to one of the listed issue types for the selected project.
-
Set Transition status to the status that the issue should have after this transition. You can use workflow expressions as input here.
-
Set Issue ID or key to transition to the exact issue ID (for example,
XYZ-1234
) or key. -
optional Enter a comment to be added to the issue during the transition operation.
-
If the destination status requires extra fields to fulfill the transition, enter them in key/value pairs as follows.
Key Value customfield_10041
A valid URL, such as
https://www.example.com/
customfield_10055
A required value as defined by the Jira administrator.
-
To test your workflow, select Run.
Action result
The Transition issue action currently provides no results, but the Input tab shows all IDs associated with the transition and the logs provide some feedback.
The Detail tab shows the State of the operation:
Success
if the transition operation passedFailed
(with more information) if the transition failed
Comment on issue
- Open Workflows
and select
to create a new workflow.
- In the side panel, select the trigger best suited to your needs.
- On the trigger node, select
to browse available actions.
- In the side panel, search the actions for Jira for Workflows and select Comment on issue.
- Select a preconfigured Jira connection.
- Provide an issue ID or the issue key (for example,
XYZ-1234
). It is also possible to use workflow expressions as input. - Provide the comment. Format your message using Jira Markdown. It is also possible to use workflow expressions as input.
- To test your workflow, select Run.
Action result
The Comment on issue action provides the following result:
Property | Description |
---|---|
| The numeric ID of the comment (for example, |
Note: This result can be used as inputs for other Workflow actions via workflow expressions.
Change assignee
- Open Workflows
and select
to create a new workflow.
- In the side panel, select the trigger best suited to your needs.
- On the trigger node, select
to browse available actions.
- In the side panel, search the actions for Jira for Workflows and select Change assignee.
- Select a preconfigured Jira connection.
- Provide an Issue ID or the issue key (for example,
XYZ-1234
). It is also possible to use workflow expressions as input. - Select an assignee from the list and optionally search for the user by name.
- To test your workflow, select Run.
Troubleshooting
The following are solutions to problems some people had with Jira for Workflows actions.