Actions for Jira Connector

  • Latest Dynatrace
  • Reference
  • 5-min read

The following workflow actions are available for Jira Connector Jira for Workflows.

Change assignee

Change the assignee of a Jira Issue.

Inputs

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
Issue keyThe exact issue key, for example, XYZ-1234. You can also use workflow expressions as input.required
AssigneeThe user name of the assignee.required

Comment on issue

Comment on a Jira issue.

Inputs

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
Issue keyThe exact issue key, for example, XYZ-1234. You can also use workflow expressions as input.required
Enter a commentThe comment. Format your message using Jira Text Formatting Notation. You can also use workflow expressions as input.required

Output

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.

Create issue

Create a new Jira issue with various fields.

Inputs

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
ProjectThe name of the Jira project.required
Issue typeThe issue type.required
PriorityThe set priority.optional
AssigneeThe name of the assignee.optional
ReporterThe name of the reporter.optional
LabelsJira labels.optional
ComponentsJira components.optional
SummaryThe summary text. It will be truncated to 255 characters.required
DescriptionThe Jira issue description.optional
FieldsJira fields.optional

Output

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.

Edit issue

Edit an already existing Jira Issue.

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
Issue keyThe exact issue key, for example, XYZ-1234. You can also use workflow expressions as input.required
Enter a commentThe comment. Format your message using Jira Text Formatting Notation. You can also use workflow expressions as input.optional
FieldsCustom field.optional

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

If you need to pass an array to a custom field using a Jinja expression, you must convert the array into a JSON string using the to_json function.

For example, suppose a preceding JavaScript action returns the following object:

return {
labels: [
  "some-label",
  "some-other-label"
]
};

To assign this array to the labels custom field, you need to serialize the result using to_json, as shown below:

KeyValue
labels{{ result("run_javascript_1")["labels"] | to_json }}

Since the custom field expects a string, the to_json function ensures the array is properly formatted as a JSON string.

Execute JQL queries to fetch issues from Jira.

Inputs

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
JQLA valid JQL for search, for example, PROJECT = CA AND assignee = null.required
FieldsA comma-separated list of fields returned from the search, for example, key,summary,created.12optional
ExpandA comma-separated list of entities that you want to be expanded, for example, names, renderedFields.optional
Maximum number of resultsThe maximum number of results the search returns, for example, 10.3optional
1

By default, only navigable (*navigable) fields are returned in this search resource.

2

Examples for filters: Examples for filters: *all - include all fields; *navigable - include just navigable fields; summary,comment - include just the summary and comments; -description - include navigable fields except the description (the default is *navigable for search); *all,-comment - include everything except comments

3

Number of issues returned by one query will be truncated to 1000. Be aware that action might fail if result is too large.

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

Output

  • The Detail tab shows the State of the operation:

    • Success if the JQL search operation passed
    • Failed (with more information) if the search failed
  • The Result tab lists all the records from the search (if the search was successful).

Link two Jira issues.

Inputs

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
Inward issueThe key of a linked issue.required
Link typeThe type of link between the two issues.required
Outward issueThe key of a linked issue.required
CommentComment on the inward linked issue.optional

Transition issue

Transition the Jira issue's state.

Inputs

FieldDescriptionRequired
ConnectionThe preconfigured connection to the Jira instance.required
Issue keyThe exact issue key, for example, XYZ-1234.required
Transition statusThe status that the issue should have after this transition. You can use workflow expressions as input here.required
Enter a commentThe text that you want to add to the issue during the transition operation. You can also use workflow expressions as input.optional
FieldsCustom field.optional

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

Output

The Transition issue action currently provides no results, but the Input tab shows all IDs associated with the transition and the logs provide some information.

The Detail tab shows the State of the operation:

  • Success if the transition operation passed
  • Failed (with more information) if the transition failed
Related tags
Software Delivery