CMJ Integrity Check reports Service desk related errors such as Screen 'JIRA Service Desk Pending Reason screen' has duplicates

Symptoms:

During an integrity check or when creating a snapshot CMJ reports a lot of errors such as "Screen 'JIRA Service Desk Pending Reason screen' has duplicates".


Cause:

This is a known issue in JIRA when creating a JSD project, which is not addressed yet. You can vote for it here:

https://jira.atlassian.com/browse/JSDSERVER-6410

In brief, using the JSD project templates creates screens with duplicate names, which is not allowed in Jira's UI.



Resolution:

Normally to fix these you'd go to the Screens page in Jira and rename/remove the duplicates.

Alternatively, rename the duplicate screens through the database (by appending the screen id). Only use this in testing instances, or after a db backup!

SELECT * FROM FIELDSCREEN where name like 'JIRA Service Desk Pending Reason screen%'

update FIELDSCREEN set name = CONCAT(name, id) where name = 'JIRA Service Desk Pending Reason screen';
update FIELDSCREEN set name = CONCAT(name, id) where name = 'JIRA Service Desk Resolve Issue Screen' 
update FIELDSCREEN set name = CONCAT(name, id) where name = 'Workflow Screen'