---
agentTools:
  projectIndex: https://help.logichub.com/llms.txt
---

# Jira

Version: 5.0.13

Jira provides bug tracking, issue tracking, and project management functions.

# Connect Jira with LogicHub

1. Navigate to **Automations** > **Integrations**.
2. Search for **Jira**.
3. Click **Details**, then the **+** icon. Enter the required information in the following fields.
   * **Label**: Enter a connection name.
   * **Reference Values**: Define variables here to templatize integration connections and actions. For example, you can use <https://www.{{hostname}}.com> where, hostname is a variable defined in this input. For more information on how to add data, see ['Add Data' Input Type for Integrations](add-an-integration-connection#add-data-input-type-for-integrations).
   * **Verify SSL**: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
   * **Remote Agent**: Run this integration using the LogicHub Remote Agent.
   * **URL**: URL of the Jira server.
   * **User**: User name to log in with.
   * **Password or API Token**: Password or API Token to log in with.
     * API Token is recommended. Also, only API Token will work if third-party sign-in is enabled in JIRA. For more information on how to generate an API token, [click here](https://confluence.atlassian.com/cloud/api-tokens-938839638.html).
4. After you've entered all the details, click **Connect**.

# Actions for Jira

## Create Issue

This action creates a ticket with the specified details whenever the parent table has any results. The parent table's data is put into the ticket's description field.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name              | Description                                                       | Required |
| :---------------------- | :---------------------------------------------------------------- | :------- |
| Project                 | Select the Jira project to use for the new issue.                 | Required |
| Title Column Name       | Column name that contains the title of the issue to create.       | Required |
| Description Column Name | Column name that contains the description of the issue to create. | Required |
| Type                    | Select Issue type.                                                | Required |
| Priority                | Select issue priority.                                            | Required |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* result: created ticket details

![](https://files.readme.io/362fa33-Screenshot_2020-03-20_at_9.17.56_AM.png "Screenshot 2020-03-20 at 9.17.56 AM.png")

## Create Issue V2

Creates a Jira issue for each row in the input table.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name           | Description                                                                                                                                                                                                                                         | Required |
| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Project              | Select the Jira project to use for the new issue.                                                                                                                                                                                                   | Required |
| Title Template       | Jinja2 template for the issue title.                                                                                                                                                                                                                | Required |
| Description Template | Jinja2 template for the issue description.                                                                                                                                                                                                          | Required |
| Type                 | Issue type (example: Bug and Task).                                                                                                                                                                                                                 | Required |
| Priority             | Issue priority (example: Low, Medium, and Critical). If unselected default priority (configured in Jira) will be used.                                                                                                                              | Optional |
| Labels               | Jinja2 templatized JSON array of string labels.                                                                                                                                                                                                     | Optional |
| Other Fields         | Jinja2 templatized JSON object of extra fields like `Assignee`. Refer to [Get Account ID of Jira Users](#get-account-id-of-jira-users). For user field, emailAddress and displayName could also be used apart from the fields mentioned in the API. | Optional |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* result: created ticket details

![](https://files.readme.io/bb669da-Screenshot_2020-03-20_at_9.31.21_AM.png "Screenshot 2020-03-20 at 9.31.21 AM.png")

## Create Issue with Optional Fields

Creates a Jira issue for each row in the input table.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name           | Description                                                                                                                                                                                                                                         | Required |
| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Project              | Select the Jira project to use for the new issue.                                                                                                                                                                                                   | Required |
| Title Template       | Jinja2 template for the issue title.                                                                                                                                                                                                                | Required |
| Description Template | Jinja2 template for the issue description.                                                                                                                                                                                                          | Optional |
| Type                 | Issue type (example: Bug, Task).                                                                                                                                                                                                                    | Required |
| Labels               | Jinja2 templatized JSON array of string labels.                                                                                                                                                                                                     | Optional |
| Other Fields         | Jinja2 templatized JSON object of extra fields like `Assignee`. Refer to [Get Account ID of Jira Users](#get-account-id-of-jira-users). For user field, emailAddress and displayName could also be used apart from the fields mentioned in the API. | Optional |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* result: created ticket details

![](https://files.readme.io/b4aba78-Screenshot_2020-03-20_at_9.36.06_AM.png "Screenshot 2020-03-20 at 9.36.06 AM.png")

## Add Comment

Adds a comment to an existing Jira issue for each row in the input table.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name               | Description                                                                                   | Required |
| :----------------------- | :-------------------------------------------------------------------------------------------- | :------- |
| Issue ID/Key Column Name | Column name containing the issue ID or key. The comment will be added to the specified issue. | Required |
| Comment Body Template    | Jinja2 template for the comment body.                                                         | Required |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null

![](https://files.readme.io/28defae-Screenshot_2020-03-20_at_9.42.17_AM.png "Screenshot 2020-03-20 at 9.42.17 AM.png")

## Query Issues

This action queries Jira for tickets that match the given JQL.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name            | Description                                                                                                                                   | Required |
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Query                 | JQL query, with optional variable substitution denoted by column names in double braces {{ and }}.                                            | Required |
| Output Type           | The action either returns one JSON per input row or one JSON per issue found or one JSON per issue found (Default: One JSON per issue found). | Optional |
| Max number of results | Maximum number of results to retrieve from JIRA, per query (Default is 1000 results).                                                         | Optional |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* other key fields of result

![](https://files.readme.io/d0aadf8-Screenshot_2020-03-20_at_9.53.23_AM.png "Screenshot 2020-03-20 at 9.53.23 AM.png")

## Get Issue

This action retrieves the Jira ticket for a given issue key.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name                    | Description                                                                                                       | Required |
| :---------------------------- | :---------------------------------------------------------------------------------------------------------------- | :------- |
| Jira Issue ID/Key Column Name | Column name containing the issue ID or key of the Jira ticket to retrieve.                                        | Required |
| Download Attachment           | Select option Yes/No to download attachments. Downloading attachments may take additional time (default is `No`). | Optional |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* other key fields of result

![](https://files.readme.io/4f60520-Screenshot_2020-03-20_at_11.41.01_AM.png "Screenshot 2020-03-20 at 11.41.01 AM.png")

<br />

## Query Issues v3

Query Jira issues using the enhanced v3 search service.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name  | Description                                                                                                                                                                | Required |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Query       | Bounded JQL query, with optional variable substitution denoted by column names in double braces {{ and }}.                                                                 | Required |
| Fields      | Optional list of fields to return. Provide a comma-separated list or JSON array (for example: \["summary","status"]). Leave blank to use the Jira default (issue id only). | Optional |
| Max results | Maximum issues to return per request (default 1000, maximum 5000).                                                                                                         | Optional |
| Output Type | Return one JSON per input row or one JSON per issue found (Default: One JSON per input row).                                                                               | Optional |

### Output

JSON containing the following items:

```json
{
"result": {},
"error": null,
"has_error":false,
}
```

## Update Status

This action updates the status of a given issue key.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name                    | Description                                                                               | Required |
| :---------------------------- | :---------------------------------------------------------------------------------------- | :------- |
| Jira Issue ID/Key Column Name | Column name containing the issue ID or key. The specified issue's status will be updated. | Required |
| Status Column Name            | Column name containing the new status for the issue.                                      | Required |

### Output

A JSON object containing result.

```json
"data":{
"has_error":false
"result":"Transition successful"
"error":NULL
}
```

## Update Issue

This action updates the status of a given issue key.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name                    | Description                                                                                                                                                                                                                                                                                                                                                                  | Required |
| :---------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Jira Issue ID/Key Column Name | Column name containing the issue ID or key. The specified issue will be updated.                                                                                                                                                                                                                                                                                             | Required |
| Assignee Column Name          | Column name that contains accountID of the new assignee of the issue.                                                                                                                                                                                                                                                                                                        | Optional |
| Description Column Name       | Column name that contains the updated description of the issue.                                                                                                                                                                                                                                                                                                              | Optional |
| Other Fields                  | Jinja2 templatized JSON object of extra fields. 'assignee' and 'description' fields specified here will be ignored if they're provided above.  To get accountID of users for `Assignee`, refer to [Get Account ID of Jira Users](#get-account-id-of-jira-users). For user field, emailAddress and displayName could also be used apart from the fields mentioned in the API. | Optional |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* result: Updated successfully.

![](https://files.readme.io/d3e2f66-Screenshot_2020-03-20_at_11.52.36_AM.png "Screenshot 2020-03-20 at 11.52.36 AM.png")

## Upload Attachments

Upload attachment to a Jira Issue.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

[block:parameters]
{
  "data": {
    "h-0": "Input Name",
    "h-1": "Description",
    "h-2": "Required",
    "0-0": "Jira Issue ID/Key Column Name",
    "0-1": "Column name containing the issue ID or key. Attachments will be added to the specified issue.",
    "0-2": "Required",
    "1-0": "Attachment File IDs Column Name",
    "1-1": "Column name that contains file ids of the attachments to be attached to Jira issue.  \nExample: column-value: 'asdfghjklqwerty,zxcvbnmqwerty'",
    "1-2": "Required",
    "2-0": "Attachment Names",
    "2-1": "Column that contains new names to be given to the uploaded attachments.  \nExample: column-value: 'triage-alerts1.csv,triage-alerts2.csv'. If not provided or the count of file-ids is more than file-names, file-id will be used as the name for the remaining files.",
    "2-2": "Optional"
  },
  "cols": 3,
  "rows": 3,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* result: Uploaded successfully.

![](https://files.readme.io/d5ba6d6-screenshot-1_1 "screenshot-1 (1)")

## Get Comments

Get Comments for an issue.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name               | Description                                                                                                                       | Required |
| :----------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Issue ID/Key Column Name | Column name containing the issue ID or key. Comments of specified issues will be fetched.                                         | Required |
| Start At                 | Page Offset to start at (default '0').                                                                                            | Optional |
| Max Results              | Max number of results on the page that should be included (default '50').                                                         | Optional |
| Order By                 | Specify the field on which comments should be ordered. (Default '-created' to get the latest comments first). '-' for descending. | Optional |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* other key fields of result

![](https://files.readme.io/f7c45e4-f2433f0-Screenshot_2020-03-20_at_12.20.48_PM.png "f2433f0-Screenshot_2020-03-20_at_12.20.48_PM.png")

## Link Issues

Links an issue to another issue.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name                      | Description                                            | Required |
| :------------------------------ | :----------------------------------------------------- | :------- |
| Issue Key Column Name (Inward)  | Column name containing the issue key of inward issue.  | Required |
| Issue Key Column Name (Outward) | Column name containing the issue key of outward issue. | Required |
| Issue Link Types                | Select the type of Issue-link.                         | Required |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* other key fields of result

![](https://files.readme.io/fad2388-screenshot-3_1 "screenshot-3 (1)")

## Download Attachments

This action downloads the Jira attachments identified by attachment ID.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name                     | Description                                           | Required |
| :----------------------------- | :---------------------------------------------------- | :------- |
| Jira Attachment ID Column Name | Column name containing the attachment ID to download. | Required |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* other key fields of result

![](https://files.readme.io/e8e1c9e-Screenshot_2020-08-17_at_11.32.37_AM.png "Screenshot 2020-08-17 at 11.32.37 AM.png")

## Delete Attachment

This action deletes the Jira attachment identified by attachment Id.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name         | Description                                                           | Required |
| :----------------- | :-------------------------------------------------------------------- | :------- |
| Jira Attachment Id | [Jinja-templated](https://help.logichub.com/docs/jinja-template) for the attachment ID to delete | Required |

### Output

A JSON object containing multiple rows of result:

* has\_error: True/False
* error: message/null
* result: deleted successfully

```json
{
    "has_error": false,
    "result": "deleted successfully",
    "error": null
}
```

# Get Account ID of Jira Users

Jinja template to be provided in `Other Fields` to set `Assignee`:

```json
{
  "assignee": {
    "accountId": "{{account_id_column}}"
  }
}
```

`accountId` for a user can be fetched by using `Web API` integration and making call a call to Jira Users Search API `https://<company-subdomain>.atlassian.net/rest/api/3/users/search`

## Get Watchers

This action returns the list of watchers for the issue with the given key.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name        | Description                                                                                  | Required |
| :---------------- | :------------------------------------------------------------------------------------------- | :------- |
| Jira Issue Id/Key | [Jinja-templated](https://help.logichub.com/docs/jinja-template) text containing the issue ID or key of the Jira ticket | Required |

### Output

JSON containing the following items:

```json
{
  "self": "https://logic.atlassian.net/rest/api/2/issue/TEST-1234/watchers",
  "has_error": false,
  "error": null,
  "watchers": [
    {
      "displayName": "ABC",
      "self": "https://logic.atlassian.net/rest/api/2/user?accountId=61ddcasdfac00708d2383",
      "avatarUrls": {
        "24x24": "https://secure.gravatar.com/avatar/0902013a35e2d0dfasdfbc25532?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSY-3.png",
        "32x32": "https://secure.gravatar.com/avatar/0902013a35asdff189fbc25532?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSY-3.png",
        "48x48": "https://secure.gravatar.com/avatar/0902013a3asdfasd135f189fbc25532?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSY-3.png",
        "16x16": "https://secure.gravatar.com/avatar/0902013a3asdffbc25532?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSY-3.png"
      },
      "emailAddress": "asdf@logic.com",
      "accountType": "atlassian",
      "active": true,
      "timeZone": "America/Los_Angeles",
      "accountId": "61ddasdfac00708d2383"
    },
    {
      "displayName": "QWER",
      "self": "https://logic.atlassian.net/rest/api/2/user?accountId=61ccab1c7aa7ac0070dd8302",
      "avatarUrls": {
        "24x24": "https://secure.gravatar.com/avatar/b771e9b4asdfsdfa57269457db0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-6.png",
        "32x32": "https://secure.gravatar.com/avatar/b771e9b4asdfsadfed4c3a57269457db0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-6.png",
        "48x48": "https://secure.gravatar.com/avatar/b771e9b4asdfasdfd4c3a57269457db0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-6.png",
        "16x16": "https://secure.gravatar.com/avatar/b771e9b4asdfasdfd4c3a57269457db0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-6.png"
      },
      "emailAddress": "qwer@logic.com",
      "accountType": "atlassian",
      "active": false,
      "timeZone": "America/Los_Angeles",
      "accountId": "61casdfc0070dd8302"
    }
  ],
  "watchCount": 2,
  "isWatching": true
}
```

## Add Watcher

This action returns the list of watchers for the issue with the given key.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name        | Description                                                                                  | Required |
| :---------------- | :------------------------------------------------------------------------------------------- | :------- |
| Jira Issue Id/Key | [Jinja-templated](https://help.logichub.com/docs/jinja-template) text containing the issue ID or key of the Jira ticket | Required |
| Jira Account Id   | [Jinja-templated](https://help.logichub.com/docs/jinja-template) text containing the account ID                         | Required |

### Output

JSON containing the following items:

```json
{
  "has_error": false,
  "result": "Added successfully",
  "error": null
}
```

## Remove Watcher

This action returns the list of watchers for the issue with the given key.

### Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

| Input Name        | Description                                                                                  | Required |
| :---------------- | :------------------------------------------------------------------------------------------- | :------- |
| Jira Issue Id/Key | [Jinja-templated](https://help.logichub.com/docs/jinja-template) text containing the issue ID or key of the Jira ticket | Required |
| Jira Account Id   | [Jinja-templated](https://help.logichub.com/docs/jinja-template) text containing the account ID                         | Required |

### Output

JSON containing the following items:

```json
{
  "has_error": false,
  "result": "Removed successfully",
  "error": null
}
```

# Release Notes

* `v5.0.13` - New action 'Query Issues v3' which uses updated Atlassian Jira's endpoint.
* `v5.0.10` - Bug Fix for correlation of results when using multithread.
* `v5.0.0` - Updated architecture to support IO via filesystem
* `v4.4.1` - Added 3 actions: `Get Watchers`, `Add Watcher` and `Remove Watcher`.
* `v4.3.1` - Bug fix : Truncate text being sent to the description field to the allowable limit in `Create issue`, `Create issue v2`, `Create issue with optional field` and `Update issue` actions.
* `v4.3.0` - Changes field type of query field in `Query Issues` action
* `v4.2.0` - Modified Update Status action for returning data in Json
* `v4.1.1` - Added Delete Attachment action.
* `v4.1.2` - Modified Query Issues action for getting any number Issues.
* `v4.1.3` - Modified Query Issues action for valid response when getting 0 results in response.