Getting the custom field context when updating the default value

Phil Manser June 26, 2017

When a user updates the default value for my custom field I need to perform additional actions on previous instances of my custom field. To do this properly though, I need to know what the context is for my custom field so that when I search for previous instances to update, I only update custom fields with the same context.

Can someone point me to the code I need to use? Thanks.

 --------------------------------

For some reason I'm unable to provide the following as an answer, so I'm going to just update this description with what I was able to figure out.

I was actually able to figure this out so I'm documenting it here in case someone else needs the same information.

In my the setDefaultValue method of my custom type I had to get the FieldConfigSchemeManager and pass it the FieldConfig. From the object I received I was then able to get the Contexts which gave me the Projects from which I was finally able to get the Issues that needed to be updated. 

1 answer

0 votes
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 30, 2017

Hi Phil,

Thank you for updating question with your answer so the community can benefit. 

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer