Your Dynatrace environment can integrate with a Jira Cloud or Server instance using Jira for Workflows . With this integration, you can automate creating, commenting, and assigning Jira issues on the events and schedules defined for your workflows.
To use Jira workflow actions, you first need to install Jira for Workflows from Dynatrace Hub.
To install Jira for Workflows, you need the app-engine:apps:install
permission.
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
Configure EdgeConnect
Grant permissions to Workflows
Authorize connection to Jira
*.atlassian.net
can be added if the Jira for Workflows actions should connect to a Jira Cloud instance.This way, you can granularly control the web services to which your Dynatrace environment can connect.
If you are connecting to a self-hosted Jira instance, you might require EdgeConnect to establish a connection behind your firewall.
Some permissions are required by Workflows to run actions on your behalf.
To fine-tune permissions granted to Workflows
app-settings:objects:read
state:app-states:read
state:app-states:write
state:app-states:delete
For more on general Workflows user permissions, see User permissions for workflows.
For more on general Workflows user permissions, see User permissions for workflows.
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.
To improve traceability and audibility, use a Jira service user to access your Jira instance.
To add connection settings, you need the following permissions:
ALLOW settings:objects:read, settings:objects:write, settings:schemas:read WHERE settings:schemaId = "app:dynatrace.jira:connection"
For details, see Permissions and access.
Be aware that connections are shared and can be used by all users with app-settings
read permissions. This is by design, as workflows enable a simplified ticket lifecycle across projects and entities.
Go to 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 Text Formatting Notation. You can also use workflow expressions as input for the description.
To test your workflow, select Run.
The Create Issue action provides the following result:
Property
Description
id
The numeric ID of the newly created Jira issue (for example, 1234567
).
key
The Jira issue key of the newly created Jira issue (for example, XYZ-1234
).
url
A URL that links to the newly created Jira issue (for example, https://<your-jira-instance>.atlassian.net/browse/XYZ-1234
).
This result can be used as inputs for other workflow actions via workflow expressions.
Go to 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 Issue Key to the exact issue key (for example, XYZ-1234
).
Set Transition Status to the status that the issue should have after this transition. You can use workflow expressions as input here.
In Enter a comment (optional), write the text that you want to add to the issue during the transition operation.
If the destination status requires extra Fields to fulfill the transition, enter them in Key/Value pairs.
Select Add Field.
The syntax for custom field values depends on the custom field type. For more information, see Jira documentation for Setting custom field data for other field types.
Examples:
Key
Value
FreeTextField
"customfield_10004": "Free text goes here. Type away!"
GroupPicker
"customfield_10005": { "name": "jira-developers" }
MultiSelect
"customfield_10008": [ {"value": "red" }, {"value": "blue" }, {"value": "green" }]
NumberField
"customfield_10010": 42.07
Select Save.
To test your workflow, select Run.
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 failedXYZ-1234
). It is also possible to use workflow expressions as input.The Comment on issue action provides the following result:
Property
Description
id
The numeric ID of the comment (for example, 123456
).
This result can be used as inputs for other Workflow actions via workflow expressions.
XYZ-1234
). It is also possible to use workflow expressions as input.PROJECT = CA AND assignee = null
).key,summary,created
). See the onscreen instructions for additional options.names, renderedFields
). You can optionally leave this empty.10
).The Detail tab shows the State of the operation:
Success
if the JQL search operation passedFailed
(with more information) if the search failedThe Result tab lists all the records from the search (if the search was successful).
The following are solutions to problems some people had with Jira for Workflows actions.