Skip to main content
Example scripts
arrow icon
To homepage
Jira
Cloud icon
Cloud

Access fields from the issue object in Behaviours for Jira Cloud

Features
Behaviours
Tags
Created 1 year ago, Updated 23 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
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