...
The External Data field enables you to synchronize your Jira fields with data from your external APIs. It provides three four main functionalities:
Displaying numeric or text data from external APIs on issues using External Data Number Fields and External Data Text Fields
Displaying options coming from external data source based on issue data using External Data Select and External Data Multi Select fields
Synchronizing options in Jira's select, multi-select, checkbox, and cascading-select fields with data from external APIs
A multi-level cascading select field whose options can be synchronized with data from external APIs
...
You need to provide the URL, Response Type and Authorization Type of your data source. Depending on the Authorization Type, you may be required to enter a few more parameters such as tokens or username/passwords. Additionally, you need to describe which part of the response should be displayed on the field value by using JSON/XML Path. You can check this link for JSON path syntax, and this link for Xpath syntax. Also, you can get help from jsonpath.com and xpather.com to check whether your paths are correct. You can also provide issue data in your request, as a query parameter or in payload for POST requests. You need to use Jira smart values to do that. After filling the necessary information, you can test the connection and the value coming from your API. The most uptodate While testing, you are expected the select an issue. This is necessary when you would like to send issue data to external data source. By clicking the play button on the right corner, you can see the result of your external field for the selected issue.
The most uptodate value coming from the source will be displayed on the issue.
Saving Values of External Number/Text Fields to Jira’s Database
Although the most uptodate values are displayed on the issues, they are not saved to the database, so the values of external data fields will be seen as empty in JQL and REST API results. To save the current values to the database, go to Settings >> Apps >> External Data Fields >> External Number/Text Fields. Choose the project for which you would like to calculate field values. Then, a modal with external data fields opens. Choose the fields you would like to calculate the values for and click “Calculate”.
...
Creating External Data Select/Multi Select Fields
...
Configuring External Data Select/Multi Select Fields
...
You need to provide the URL, Response Type and Authorization Type of your data source. Depending on the Authorization Type, you may be required to enter a few more parameters such as tokens or username/passwords. Additionally, you need to describe which parts of the response should be used as options labels and option values by using JSON/XML Path. You can check this link for JSON path syntax, and this link for Xpath syntax. Also, you can get help from jsonpath.com and xpather.com to check whether your paths are correct. After filling the necessary information, you can test the connection and options coming from your API. The most uptodate option list coming from the source will be displayed on the issue.
If you need to provide issue data in your request, as query parameter or in payload, you can use Jira smart values.
Jira - Select/Multi-select/Checkbox
...
You can create your fields from Issues >> Custom Fields page with any of the types Select List (multiple choices), Select List (single choice) or Checkboxes.
...
Creating a data source
Before configuring your field to get its options from the API, you need to create a data source by providing the endpoint url, the response type (JSON / XML) and the authorization typeor Checkboxes.
...
Creating a data source
Before configuring your field to get its options from the API, you need to create a data source by providing the endpoint url, the response type (JSON / XML) and the authorization type. Optionally, you can provide a path to test the health of the data source. This is helpful when you want to use multiple endpoints from the same API. You can provide the domain of your API as URL and provide a health-check endpoint under this domain as “Path to Test Accessibility”. The app will send a GET request to the given path and if 200 has been returned, the data source will be considered as accessible. Depending on the authorization type, you may need to provide some credentials. Additionally, you need to provide a name for your data source.
...
Code Block | ||
---|---|---|
| ||
{ "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 }, { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 }, { "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99 } ], "bicycle": { "color": "red", "price": 19.95 } } } |
JSON Path | Description | Result |
| The authors of all books in the store | Nifel rees, Evelyn Waugh, Herman Melville, J. R. R. Tolkien |
---|---|---|
| The price of everything in the store | 8.95, 12.99, 8.99, 22.99, 19.95 |
| Titles of the first two books | Sayings of the Century, Sword of Honour |
| Titles of the first two books | Sayings of the Century, Sword of Honour |
| Titles of the all books which are cheaper than 10 | Sayings of the Century, Sword of Honour, Moby Dick |
Example - XML
Code Block | ||
---|---|---|
| ||
<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> |
JSONPath | Description | Result |
| The title elements of the book elements under the bookstore tag | Everyday Italian , Harry Potter, XQuery Kick Start, Learning XML |
---|---|---|
| The title elements of any book element | Everyday Italian , Harry Potter, XQuery Kick Start, Learning XML |
| The title elements of the books which has price field greater than 35.00 | XQuery Kick Start, Learning XML |
| All category attributes of the elements | cooking, children, web, web |
| All title elements that have an attribute called lang | Everyday Italian , Harry Potter, XQuery Kick Start, Learning XML |
| All author elements | Giada De Laurentiis, J K. Rowling, James McGovern, Per Bothner, Kurt Cagle, James Linn, Vaidyanathan Nagarajan, Erik T. Ray |
Jira - Cascading Select
You can configure your Cascading Select typed fields from "Configurations" tab like other fields. However, you need to provide different inputs that describes which elements will constitute your first level options and inside those elements which parts will be considered as the second level options. The configuration form has 6 fields other than context and data source, their descriptions are as follows:
...