Screens cannot be viewed in Jira due to duplicate Operation associations

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible


Problem

When creating issues users get a 500 internal server, and when viewing the Screens admin screen it is blank.

The following appears in the atlassian-jira.log

Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Duplicate key com.atlassian.jira.issue.fields.screen.FieldScreenSchemeItemImpl@83d203ad

Diagnosis

Run the following query to find duplicate operation associations:




select fssi.id, fssi.operation, fssi.fieldscreen, fs.name as "Screen Name", fssi.fieldscreenscheme as "Screen Scheme", fss.name from fieldscreenschemeitem fssi 
join fieldscreenscheme fss on fssi.fieldscreenscheme = fss.id join fieldscreen fs on fs.id = fssi.fieldscreen 
where fssi.fieldscreenscheme in (select fieldscreenscheme from fieldscreenschemeitem group by fieldscreenscheme, operation having count(operation) > 1) and operation in (select operation from fieldscreenschemeitem group by fieldscreenscheme, operation having count(operation) > 1)


Cause


Duplicate operations are associated to the same screen.

Workaround

Remove any duplicate rows. There should only be one operation ID for each screen scheme ID. In this example, there are duplicate operation IDs for the same screen scheme:

idoperationfieldscreenScreen NameScreen SchemeName
101100PK: Edit/View1010PK: Screen Scheme
201200PK: Edit Screen1010PK: Screen Scheme
  • Fix this by deleting the largest ID

    delete from fieldscreenschemeitem where ID = 20


    Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.


Last modified on May 20, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.