-
Suggestion
-
Resolution: Won't Fix
-
None
NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.
From time to time, JIRA's nodeassociation table has abandoned references between schemes and projects. This is suspected to occur if a project was deleted, but for some reason these references remain.
The integrity checker should help detect when a non-valid project ID is referenced in nodeassociation and remove the reference.
As of JIRA 7.x, for example, if there is a reference to a non-existent project, the UI will result in an error and prevent admins from modifying the schemes. The logs show:
2017-03-10 14:51:25,249 http-nio-8080-exec-46 uri:/jira/secure/admin/views/permissions/viewschemes.jsp username: admin ERROR admin 891x118804x1 1ya7wma 10.102.167.67,0:0:0:0:0:0:0:1 /secure/admin/ViewPermissionSchemes.jspa [webwork.util.ValueStack] METHOD: "projects", exception:
java.lang.NullPointerException
at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
at java.util.TimSort.binarySort(TimSort.java:296)
at java.util.TimSort.sort(TimSort.java:239)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:348)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.atlassian.jira.scheme.AbstractSchemeManager.getProjects(AbstractSchemeManager.java:481)
at com.atlassian.jira.scheme.AbstractViewSchemes.getProjects(AbstractViewSchemes.java:13)
... 2 filtered
...
A method to look for these bad references is via SQL:
- For example, when looking for a permission scheme that refers to be non-existent project:
select * from nodeassociation where sink_node_entity = 'PermissionScheme' and sink_node_id = 0 and source_node_id not in (select id from project);
- This will return references that have an invalid project ID
- This row should then be removed
- is related to
-
JRASERVER-64878 Integrity Checker Should Check and Fix Invalid Scheme References to Removed Projects
- Gathering Interest