How to get a list of all JIRA fields?

Hi,

I develop an importer from another bug-tracking system. However, this other system has a lot of different custom fields and I want to let the users decide how to map their fields, to the existing JIRA fields, instead of writting a lot of special cases... How can I do that?

Thanks,

Petya

3 answers

1 accepted

Accepted Answer
4 votes
use the following api to get all the fields
fieldManager.getAllAvailableNavigableFields()

I've got all available fields by:

ComponentAccessor.getFieldManager().getAllAvailableNavigableFields()

If you want to get a list of all custom fields defined in JIRA use CustomFieldManager.getCustomFieldObjects. Check also other methods there.

That way I can get only the custom fields, right? I need all Issue fields.

did you tried with my answer?

Yes, but I didn't succeed. I don't know where to call that function.

If your importer is an application outside of Jira, you can use Jira's REST API (http://docs.atlassian.com/jira/REST/5.0/#id199677) to get all the custom fields for an issue. Then once you have the mapping figured out, you can also use the REST api to create issues and set custom field values.

My plugin is a part of your JIRA importer plugin and I need all of the standard fields as well as the custom ones. Some of the fields from Savannah could be mapped to standard JIRA fields. No need to create custom fields in that case, right?

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,807 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