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 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

498 views 6 11
Read article

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