How to compare two field configurations in JIRA?

Nithya Ananda July 20, 2017

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?

 

3 answers

1 vote
Rachel Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 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

deborah duffy February 13, 2020

Hello, 

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

Like jeroen.wilmes likes this
Erin Quick-Laughlin November 24, 2021

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.

Like # people like this
0 votes
jeroen.wilmes
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.
February 7, 2023

thanks for sorting this out and scharing, but to be honest this is not a user friendly solution.  Maintenance of configurations is important and should be better, more user friendly (admin level) supported. 

Rachel Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2023

Hi @jeroen.wilmes, I totally agree! I wrote my "answer" in 2017, so here's a bit of an update. While Atlassian still doesn't have native scheme comparison functionality, there are some apps in the Atlassian Marketplace that provide it plus other helpful admin functions.. 

My favorites are Configuration Manager for Jira (CMJ) and Salto Configuration Manager for Jira.

Thanks to @robert.nadon for the REST API strategy posted below too!

Good luck to everyone on your clean up and maintenance endeavors!

Rachel Wright
Author, Jira Strategy Admin Workbook

Like # people like this
jeroen.wilmes
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.
February 9, 2023

thanks for the update, looks indeed a good step in right direction. Although I would expect this to be part of what Jira has to offer and not depending on apps from third parties. Feels a bit like buying a Rolls Royce and to be referred to another party for an app to see what your speed is and your millage. Anyhow many thanks.

Like # people like this
Stumper Dumpel March 11, 2024

Hi @Rachel Wright , how compare 2 field configurations in Configuration Manager for Jira?

0 votes
robert.nadon
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.
May 26, 2021

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. 

robert.nadon
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.
May 26, 2021

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
Erin Quick-Laughlin November 24, 2021

Care to share that code, @robert.nadon ?

bertrand.drouhard January 13, 2022

@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

Like Carol Lage likes this
bertrand.drouhard January 13, 2022

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']
Like Carol Lage likes this

Suggest an answer

Log in or Sign up to answer