Get a list of field attributes for specific screens.

Pauletta Bingaman January 24, 2018

I would like to get a list of the attributes for the fields in my JIRA project and issue fields so that I can define mapping for integration from JIRA into and out-of an external data source.  Does anyone know how to get that information? 

Thank you so much for your insights!

2 answers

1 accepted

0 votes
Answer accepted
Pauletta Bingaman January 28, 2018

I found an Atlassian site that provided high-level information to meet my needs for now.  The following link accesses Atlassian "database" information without requiring programming.  It also provides SQL queries to get the info if you have access to the JIRA database.  I hope it is helpful to other non-programmers out there!

https://developer.atlassian.com/server/jira/platform/database-issue-fields/

Thank you for your help!

Pauletta

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2018

Hello,

What do you mean by "the attributes for the fields"? If you want to find issue fields you need to check the create, edit and view screens and also screens which are used in workflows for your project. It is a good practice (at least for me) to add a prefix with the project key to all screens which are used in the project.

Pauletta Bingaman January 26, 2018

Hi Alexey,  Thanks for responding.  I'm sorry my question wasn't clear. I am trying to find a way to get a list of the fields in my issue screen.  I want the list to also include information about the attributes of the fields such as data type, field length, requires or not required, default value, valid field values (for picklist fields), etc.  Are you aware of any way to get this type of list in JIRA?  Thank you for your insights!

Pauletta

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2018

Do you want to get this info automatically? If yes then you would need to write a program using Jira Java Api. For example this program in groovy would iterate over all screens and get info about all custom fields.

import com.atlassian.jira.component.ComponentAccessor
ComponentAccessor.getFieldScreenManager().getFieldScreens().each{
    it.getTabs().each {  tab ->
        tab.getFieldScreenLayoutItems().each { fsl ->
            log.error(fsl.getFieldId())
            def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(fsl.getFieldId())
            if (cf != null)
             log.error(cf.getName() + " " + cf.getCustomFieldType().getKey());
        }
    }
}
Pauletta Bingaman January 26, 2018

I am sorry, Alexey; I'm not a programmer.  I don't even know where I would go to enter the code you listed above.  I was hoping to find-out that JIRA provides a user-friendly utility that I could use to generate a schema list for my Issues screens.  Based on your response and my research, it seems that a field schema list generator utility does not exist in JIRA.

I'm sorry to ask a very basic question but will you please tell me where I should enter the code you've provided above? 

Also, I actually need a field schema list for all fields (standard and custom) in my Issues screen.  Will you modify the query to give me a list of all fields in my Issues screen and attributes information about each fields (such as data type, field length, requires or not required, default value, valid field values (for picklist fields), etc). 

Thank you for your patience with a non-programmer who is assigned to do programming tasks at work!

Pauletta

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 27, 2018

I do not know of such a plugin which would let you get the information that you need. But you can get it by using Jira GUI.

Pauletta Bingaman January 28, 2018

Thank you for your insights, Alexey. I will follow-up to try to use Jira GUI.  I appreciate you taking the time to respond to my question!  I hope you have a wonderful weekend. 

Pauletta

Pauletta Bingaman January 28, 2018

Thanks again for taking the time to respond to my question, Alexey.  You've inspired me to expand my knowledge of Jira GUI which will help me a lot going forward.  Your generosity with your knowledge is admirable.  Please continue to help me and others.  You are one of only a few who will take the time to do it!  You are appreciated.

Like Vasanthakumar V likes this

Suggest an answer

Log in or Sign up to answer