Example scripts
To homepage
Jira

Access fields from the issue object in Behaviours for Jira Cloud
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira
Language |
typescript
// Access the context for the UI Modification
const context = await getContext()
// Get the current issue key
const issueKey = context.extension.issue.key;
// Get the current issue object
const issue = await makeRequest("/rest/api/2/issue/" + issueKey);
// Log out to the browser some field values to show how to get them from the issue.
// Note you can access any field on an issue through the fields property
console.log("Issue Field Values:")
console.log("Status field: ", issue.body.fields.status)
console.log("Assignee field: ", issue.body.fields.assignee)
Having an issue with this script?
Report it here