Skip to main content
Book your demo
Example scripts
To homepage
Jira
Cloud icon
Cloud

Bulk Update the Value of a Custom Field on Jira Cloud Work Items

Created 2 year(s) ago, Updated 0 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira
Language |
groovy
// Specify all the required parameters
def spaceKey = 'TEST'
def customFieldName = 'Story Points'
def newCustomFieldValue = 100

// Extract work item key using JQL Query
WorkItems.search("project = $spaceKey and '${customFieldName}' is not EMPTY").each { workItem ->
    workItem.update  {
        setCustomFieldValue(customFieldName, newCustomFieldValue)
    }
}
Having an issue with this script?
Report it here