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

Connection

The preconfigured connection to the Jira instance.

Required

Issue key

The exact issue key, for example, XYZ-1234. You can also use workflow expressions as input.

Required

Assignee

The user name of the assignee.

Required

Comment on issue

Comment on a Jira issue.

Inputs

FieldDescriptionRequired

Connection

The preconfigured connection to the Jira instance.

Required

Issue key

The exact issue key, for example, XYZ-1234. You can also use workflow expressions as input.

Required

Enter a comment

The 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:

PropertyDescription

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

Connection

The preconfigured connection to the Jira instance.

Required

Project

The name of the Jira project.

Required

Issue type

The issue type.

Required

Priority

The set priority.

Optional

Assignee

The name of the assignee.

Optional

Reporter

The name of the reporter.

Optional

Labels

Jira labels.

Optional

Components

Jira components.

Optional

Summary

The summary text. It will be truncated to 255 characters.

Required

Description

The Jira issue description.

Optional

Fields

Jira fields.

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. If you have trouble finding custom field IDs, you can use the Jira issue XML view, which you can access via https://<your-jira-instance>.atlassian.net/si/jira.issueviews:issue-xml/XYZ-1234/XYZ-1234.xml.

Examples:

KeyValue

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 Create Issue action provides the following result:

PropertyDescription

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

Connection

The preconfigured connection to the Jira instance.

Required

Issue key

The exact issue key, for example, XYZ-1234. You can also use workflow expressions as input.

Required

Enter a comment

The comment. Format your message using Jira Text Formatting Notation. You can also use workflow expressions as input.

Optional

Fields

Custom 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. If you have trouble finding custom field IDs, you can use the Jira issue XML view, which you can access via https://<your-jira-instance>.atlassian.net/si/jira.issueviews:issue-xml/XYZ-1234/XYZ-1234.xml.

Examples:

KeyValue

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

Example: Provide an array via Jinja Expression

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

Connection

The preconfigured connection to the Jira instance.

Required

JQL

A valid JQL for search, for example, PROJECT = CA AND assignee = null.

Required

Fields

A comma-separated list of fields returned from the search, for example, key,summary,created.12

Optional

Expand

A comma-separated list of entities that you want to be expanded, for example, names, renderedFields.

Optional

Maximum number of results

The maximum number of results the search returns, for example, 10.3

Optional

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.

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

Connection

The preconfigured connection to the Jira instance.

Required

Inward issue

The key of a linked issue.

Required

Link type

The type of link between the two issues.

Required

Outward issue

The key of a linked issue.

Required

Comment

Comment on the inward linked issue.

Optional

Transition issue

Transition the Jira issue's state.

Inputs

FieldDescriptionRequired

Connection

The preconfigured connection to the Jira instance.

Required

Issue key

The exact issue key, for example, XYZ-1234.

Required

Transition status

The status that the issue should have after this transition. You can use workflow expressions as input here.

Required

Enter a comment

The text that you want to add to the issue during the transition operation. You can also use workflow expressions as input.

Optional

Fields

Custom 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. If you have trouble finding custom field IDs, you can use the Jira issue XML view, which you can access via https://<your-jira-instance>.atlassian.net/si/jira.issueviews:issue-xml/XYZ-1234/XYZ-1234.xml.

Examples:

KeyValue

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