Error "no fieldlayoutscheme found for id ..."

Craig Schwarze _ProjectBalm_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 17, 2023

When our app tries to retrieve the data field scheme for a particular project, we are getting this error "no fieldlayoutscheme found for id xxx"

This error is only happening on one project.

Is anyone aware of what could be causing this and how to resolve it?

thanks,
Craig

1 answer

1 vote
Radek Dostál
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.
April 18, 2023

https://jira.atlassian.com/browse/JRASERVER-68635

Which should address the problem. Alternative is that there are other orphaned/corrupted data but let's cross that bridge when we get there.

Craig Schwarze _ProjectBalm_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 18, 2023

I'm a little nervous about running a delete against the backend sql database. Have you run that one yourself?

Radek Dostál
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.
April 18, 2023

Then run a SELECT first to see what's in there

SELECT * FROM fieldlayoutschemeentity WHERE scheme NOT IN (SELECT id FROM fieldlayoutscheme);

 

fieldlayoutschemeentity represents the issuetype:fieldlayout mapping; in layman terms, what you see inside of the Field Configuration Scheme in webUI

So, assuming that this is in fact the case, the query hints towards containing a mapping of a non-existing scheme - so by all means, you cannot break anything by deleting mappings from a non-existing scheme, they're already orphaned. Any new scheme gets a new id, that id is long gone. So yes I would say this is safe, but it's always better to run a select and look around first to understand what's in the tables.

 

Of course, you should always take any suggestion with a grain of salt, and if you're not comfortable with it, test it on a non-production environment (ideally restored from a db backup to reproduce the scenario), and to take backups.

In my opinion the query only "cleans up" orphaned data which cannot otherwise be used by anything anywhere, except by being pushed into a cache and causing errors later down the road.

edit: if that problem is indeed caused by cache, you probably will need to restart Jira to refresh it, there probably is a way to invalidate it by tinkering around with something, or by using groovy API and calling a flush on it, but restarting Jira is just cleaner as it will ensure all of the pesky caches to get reloaded

 

Some examples what I see locally, where you see the relationship between fieldlayoutschemeentity.scheme <> fieldlayoutscheme.id

And I have to paste this as img because form validation here is borderline useless:

atl_fix_your_forms.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.12
TAGS
AUG Leaders

Atlassian Community Events