Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update context for custom field with scriptrunner

arielei
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2025

Hello Community,

I have custom fields that are set Globally.

I want to change them to specific projects.

 

i have an array of project keys that i want to run a script that will update the CF context.

for example, the array or project keys to set: [WHMKUK, WHH, WEBS]

is this possible via script runner in jira DC?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Kristian Walker _Adaptavist_
Community Champion
October 2, 2025

Hi @arielei

I have a sample script which I have tested on Jira DC version 10.7.4 with ScriptRunner version 9.24.0 and this script can restrict global custom field contexts for specified fields to a set of specified project keys. 

The script can be seen here and I would advise that you take a clone of your instance and test this script to validate it works as expected on a test instance before you run it in production. 

You can test this script and use it as a reference guide to help create the script that you need to achieve your requirements. 

I hope this helps.

Regards,

Kristian 

DEPLOYMENT TYPE
SERVER
VERSION
9.4.17
TAGS
AUG Leaders

Atlassian Community Events