It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Update a custom field's context.

I have tried the following code to update the custom fields context.

CustomField field = customFieldManager.getCustomFieldObjectsByName(customField).iterator().next();
FieldConfigScheme defaultConfig = field.getConfigurationSchemes().iterator().next();
List<JiraContextNode> contexts = defaultConfig.getContexts();
List<JiraContextNode> newContexts = new ArrayList<>(contexts);
FieldConfigSchemeManager fieldConfigSchemeManager = ComponentAccessor.getFieldConfigSchemeManager();
fieldConfigSchemeManager.updateFieldConfigScheme(defaultConfig, newContexts, field);

But the new context does not get applied .

0 answers

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you