Setting Custom Fields in Jira

Can anyone help me with java code for setting the values to the custom fields in jira and also checking the custom field is of cascade select type and also how to set values for custom field of cascade select type for jira 5.2.5. ?

3 answers

Thank you for the quick response.

But when i wrote the foloowing code to check whether the custom field is of type cascade select field i'm the getting the error at line :

if (customField.getCustomFieldType() instanceof CascadingSelectCFType)

it is not recognizing the "CascadingSelectCFType" keyword.

here is the code :

CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
Collection<CustomField> issueCustomFields = customFieldManager.getCustomFieldObjects(issue);

for (CustomField customField : issueCustomFields) {
if (customField.getCustomFieldType() instanceof CascadingSelectCFType) {


This code is written for jira 5.2.5.

you try explicitely for CascadingSelectCFType customfield and check

CustomField casCF = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("<your casading select field>");





For reference you check

Thank you so much.

i will try out this

We are having JIRA 3.* version, can anybody send me sample code for update issue?

I can create issue using RemoteCustomFieldValue and setting key value, however updateIssue method accepts only RemoteFieldValue and this type does not support key property.



Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,897 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot