JIRA Search

JIRA Search

In this article

Overview

You can use this Snap to perform a JIRA advanced search by executing a JIRA Query Language (JQL) statement. This Snap supports the JIRA basic auth account. The JIRA sites may or may not allow anonymous access.

jira-search-snap-overview.png

Snap Type

The Jira Search Snap is a Read-type Snap.

Support for Ultra Pipelines  

Works in Ultra Tasks

Breaking change

The output structure for the field description, field comment, and worklog comment keys in the JIRA Search Snap has changed with the JIRA REST API v3. If you rely on the output of the Search Snap in downstream Snaps, your pipelines might not function correctly.
Workaround: Update the old output keys to the new output keys as outlined below:

Old output keys:

"jsonPath($, "$issues[*].fields.description

"jsonPath($, "$issues[*].fields.comment[*].body

"jsonPath($, "$issues[*].fields.worklog[*].comment

New output keys:

"jsonPath($, "$issues[*].fields.description.content[*].content[*].text")

"jsonPath($, "$issues[*].fields.comment[*].body.content[*].content[*].text")

"jsonPath($, "$issues[*].fields.worklog[*].comment.content[*].content[*].text")

Behavior change

With the JIRA REST API v2, the values in the output were directly accessible under the field description, field comment, and worklog comment keys and displayed in text format. While, with API v3, the values for these keys are nested and displayed in JSON format.

JIRA REST API v2 output structure

JIRA REST API v3 output structure

[ {"description": ["Main order flow broken"], "comment":{"body":["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper."] }, "worklog": {"comment":[ "I did some work here." ] } } ]
{"description":[ { "content":[ {"content":[ {"text":"Main order flow broken", "type":"text" } ], "type":"paragraph"}],"type":"doc","version":1 } ], "comment":{"body":[{"content":[ { "content" [ { "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","type":"text"}], "type":"paragraph"} ], "type":"doc","version":1 } ]}, "worklog":{ "comment":[ { "content":[ {"content":[ { "text":"I did some work here.", "type":"text" } ], "type":"paragraph" } ], "type":"doc", "version":1 } ] } } ]

Snap Views

Type

Format

Examples of Upstream and Downstream Snaps

Description

Input 

Document

 

This Snap has at most one input view and receives documents in the view. Each document contains data needed to evaluate the JavaScript expression in the Java Query Language (JQL) query property.

Output

Document

 

This Snap has exactly one output view and produces documents in the view. Each document contains the response data from the JIRA REST API service endpoint.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Expression : JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.

  • SnapGPT : Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.

  • Suggestion : Populates a list of values dynamically based on your Account configuration.

  • Upload : Uploads files. Learn more.

Learn more about the icons in the Snap Settings dialog.

Field Name

Field Type

Description

Label

 

String

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Default value: JIRA Search
Example: JIRA Search

API version

 

 

String

Required. The JIRA REST API version number.

Atlassian has announced the deprecation of the version 2 of JIRA REST API effective May 1, 2025. Hence, if your pipelines use the version 2 of the JIRA REST API, they might not work. We recommend updating the API Version field in the Search Snap to 3 to enforce the use of version 3 API for the search operation.

Default value: 2
Example: 2

JQL

 

String/Expression

Required. The JQL query statement. It can be a JavaScript expression. See JIRA's Advanced Searching documentation for more information on building query statements.

Default value: [None]
Example: project=SNAP & updated > -1m

maxResults

String/Expression

The number of issues to return per page. The maximum allowable value is imposed by the JIRA property 'jira.search.views.default.max'.

  • The Snap returns all the results for a given query by default. For example, if your query includes 1000 issues, the Snap returns all 1000 issues.

  • To manage page size, Jira may provide fewer items per page when a large number of fields or properties are requested; however, all results will be returned according to the JQL query.

Maximum value: 5000

Default value:  [None]
Example: 100

validateQuery

Checkbox

Select this option to validate the JQL query.

Default state: Selected

fields

String/Expression

A comma-separated list of fields to return for each issue. By default, all navigable fields are returned.

Default value:  [None]
Example: summary,description,created,updated

expand

String/Expression

A comma-separated list of the parameters to expand.

Default value:  [None]
Example:  renderedFields,transitions,changelog,operations

Ignore empty result

Checkbox

When a JIRA operation produces no result, this property determines if the input document should be passed through to the output view or not. If selected, no document will be written to the output view. If not selected, the input document will be passed through.

Default state:  Selected

Snap Execution

Dropdown list

Select one of the following three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default ValueExecute only
Example: Validate & Execute

 

Troubleshooting

Error

Reason

Resolution

"REST API service endpoint returned error result: status code = 410,

 

The requested API has been removed by Atlassian.

Update the API URL from /rest/api/2/search to /rest/api/3/search/jql to ensure compatibility with the new API version.

A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046%5C%5C "],\"errors\":{}}",

 

Related links: