Getting the custom field context when updating the default value Edited

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

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
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

23,861 views 2 7
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you