Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table plus | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Description
Excerpt | ||
---|---|---|
| ||
Get the value of a a set of fields for the given Jira issue. |
Parameters
Table plus | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Returns
Info |
---|
Returns a Promise to the value; you must use |
Returns an array of values, each of their own data type.
Examples
Get the Affects versions and Fix versions of the issue.
Code Block |
---|
const vers = await api.issue.getFields(issue, ["versions","fixVersions"]) return json.stringify(vers) |
Returns:
Code Block |
---|
{"versions": [ { "self":"https://api.atlassian.com/ex/jira/<id>/rest/api/2/version/10001", "id":"10001", "description":"", "name":"2.0", "archived":false, "released":false }, { "self":"https://api.atlassian.com/ex/jira/<id>/rest/api/2/version/10002", "id":"10002", "description":"", "name":"1.9", "archived":false, "released":true, "releaseDate":"2024-09-24" } ], "fixVersions": [ { "self":"https://api.atlassian.com/ex/jira/<id>/rest/api/2/version/10000", "id":"10000", "description":"", "name":"2.1", "archived":false, "released":false } ] } |
Get the Labels and Components of the issue’s Parent.
Code Block |
---|
const parentIssue = await api.issue.getParentIssue(issue) const assignedTo = await api.issue.getFields(parentIssue, ["labels","components"]) return json.stringify(assignedTo) |
Returns:
Code Block |
---|
{"labels": ["leadApproved","needsDocs"], "components": [ { "self":"https://api.atlassian.com/ex/jira/<id>/rest/api/2/component/10032", "id":"10032", "name":"Authentication" }, { "self":"https://api.atlassian.com/ex/jira/<id>/rest/api/2/component/10033", "id":"10033", "name":"Infrastructure" } ] } |
You are viewing the documentation for Jira Cloud.
On this page
|
---|
Determining custom field IDs
Include Page | ||||
---|---|---|---|---|
|