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

Update the Value of Custom Fields through the Script Console in Jira Cloud

Created 1 year ago, Updated 1 month(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira
Language |
groovy
final customfieldID = 'customfield_1000' //get this from /fields api
final newFieldValue = 'New Value'
final issueKey = 'MYPROJECT-1'

put("/rest/api/2/issue/${issueKey}")
    .header('Content-Type', 'application/json')
    .body([
        fields: [
            (customfieldID): newFieldValue
        ]
    ]).asString()
Having an issue with this script?
Report it here