Error on opening a Sub-Task from parent Issue
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
Opening a Sub-task from a parent issue resulting into an error like below:

Environment
Jira v8.x
Recently migrated from Jira Cloud to Jira Server/Data Center instance
Diagnosis
After migration from Jira Cloud to Jira Server/Data Center instance, Sub-tasks cannot be opened and an error is observed. Following errors can be seen in the atlassian-jira.log
file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2022-01-01 00:52:57,126 http-nio-8080-exec-7 ERROR charlie 1002x21363x1 6ch36df /browse/LAUNCH-62 [c.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException: null value in entry: actualSequence=null
java.lang.NullPointerException: null value in entry: actualSequence=null
at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32)
at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:176)
at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:285)
at com.atlassian.jira.web.component.subtask.SubTaskSequenceColumnLayoutItem.getContext(SubTaskSequenceColumnLayoutItem.java:34)
at com.atlassian.jira.web.component.subtask.AbstractSubTaskColumnLayoutItem.getHtml(AbstractSubTaskColumnLayoutItem.java:37)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)
at com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:24)
at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:28)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212)
The above stack trace includes variableactualSequence=nullwhich is related to the links and following traces are likely to be seen after above errors:
1
2022-01-01 00:52:57,149 http-nio-8080-exec-7 ERROR charlie 1002x21363x1 6ch36df /browse/LAUNCH-62 [velocity] Exception in macro #issues at templates/jira/issue/table/issuetable-issue.vm[line 6, column 5]
Cause
The above problem can be seen in case there is an invalid data in the database which is causing the links to break like null
values in sequence. Below queries can be helpful to identify such sequences:
Identify theidfor corresponding to link name value (jira_subtask_link in this case) using below query:
1
select * from issuelinktype;
Once the id is available from above query, please execute the below query:
1
select count(*) from issuelink where linktype = <replace with id obtained from previous query> and "sequence" is null;
Solution
A null in sequence for link type jira_subtask_linkis likely to cause the error. As the sequence value is for display only and the original sequences cannot be retained, It will be safe to run the following database query on the instance to correct the issue:
Stop the Jira instance
Execute following query
1
UPDATE issuelink SET sequence = 0 WHERE linktype=<replace with id obtained from previous query> AND sequence IS NULL;
Start Jira and verify the behavior
Was this helpful?