Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to compare two field configurations in JIRA?

We are consolidating field configurations for easy maintenance. 

What is the easy way to compare any two field configurations, so that we can check for the difference and adjust in the consolidated FC?

 

2 answers

1 vote
Rachel Wright Community Leader Jul 21, 2017

Hi Nithya,

Congrats on cleaning up!

If you have Cloud, you could launch two browsers to visually compare the settings, or copy/paste the data from both into a diff program or program that will help you highlight differences, like Excel.

The best way though, if you have JIRA Server, is to get the information to compare out of the database.  Look in the "fieldlayout" table for the scheme ID and use it to find the settings in the "fieldlayout" column of the "fieldlayoutitem" table.  You may also want to join the "customfield" table to get the custom field names instead of just the field IDs.

Of course, the more fields you have the harder the comparison is.  One more reason, of many, to keep your custom field list tidy too!  :)

Hope this helps,

Rachel Wright

Hello, 

 This is becoming more problematic. Is there any other option in development? Or a ticket I can watch and vote up? thanks. 

We also would like to see a tool that makes this easier - even if we do standardize and cleanup, as we continue to acquire new companies, we need an easy, fast way do this analysis (and all other things that differ between instances / projects) .  What about starting with the logic of @robert.nadon below, and building from there?

And of course, if there's already a cloud dev ticket for this, please list and I'll vote on it.

I have to do this for cloud and will see if I can get back with a good answer.  I know it has been a while but better late than never :-)

So far two windows side by side is the best I could find as well but there has to be a better answer.  For me a field configuration on matters if a field is hidden or required so that is all I need to compare.  If config1 has fields a, b, and c hidden and d, e, and f required while config2 has a, b, and x hidden and d, g, and h required then I only need to look at fields a, b, c, d, e, f, g, h, and x much better than looking at a kagillion fields side by side.

Stay tuned for what I come up with probably some python/Bash code and a dump of the field scheme into a text file and then parse it and output a nice report. 

I did it.  In cloud use the rest API to get the fields.  This URL will work:

https://{YOURSITEHERE}.atlassian.net/rest/api/3/fieldconfiguration/{FIELD-CONFIG-ID/fields?maxResults=2000

Now replace the {CAP} items with your specific values.  To get the field config ID just go to the field configuration and look at the URL the last part will be include &id=#### and use ####

Now you have your data.  Write a program that will parse the data, each field is preceded by 

{"id":

and all we care about in the line is either of the strings 

"isHidden":true
"isRequired":true

If we find any of those print the value otherwise go to the next {"id". 

Works perfectly my code spits out a nice list of fields for a given scheme that are hidden or required.  

Next to to put that into a confluence table with multiple runs.

Like # people like this

Care to share that code, @robert.nadon ?

@Erin Quick-Laughlin  a no-code workaround is to use JMESPath on top of your API call to get what only what you want : in that case, the request is

values[?isRequired || isHidden]

The result then looks like 

[
{
"id": "customfield_10096",
"description": "Gigo Team Custom Field",
"isHidden": false,
"isRequired": true
},
{
"id": "customfield_10095",
"description": "Project code",
"isHidden": false,
"isRequired": true
}
]

 

You can use https://codebeautify.org/jsonviewer with a JMESPath filter on the output. 

See filter projection on https://jmespath.org/tutorial.html

To follow my answer, you can also remove reporter, issuetype, summary and epic name (customfield_10005 in my case) :

values[?(isRequired || isHidden) && id != 'reporter' && id != 'issuetype' && id != 'summary' && id !='customfield_10005']

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you