Automation for Jira - Transfer User fails
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
Transfer User functionality keeps spinning without triggering errors in the UI. The page seems to be loading to complete the action, but nothing changes.
Diagnosis
When trying to use the Transfer User to move rules to another user, the action keeps spinning without ever completing
The error returned:
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
2024-05-31 09:52:19,156-0300 http-nio-8080-exec-14 url: /rest/cb-automation/latest/configuration/transfer/validate; user: jiraadmin ERROR jiraadmin 592x288x1 109nefv 0:0:0:0:0:0:0:1 /rest/cb-automation/latest/configuration/transfer/validate [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.NullPointerException
at com.codebarrel.automation.rulecomponent.jira.action.assign.AssignConfigTransform.validateMigration(AssignConfigTransform.java:54)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.lambda$validateComponent$2(ConfigMigrationService.java:86)
at java.util.Optional.map(Optional.java:215)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.validateComponent(ConfigMigrationService.java:86)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.lambda$validateComponents$1(ConfigMigrationService.java:77)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
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.codebarrel.automation.api.component.migrate.ConfigMigrationService.validateComponents(ConfigMigrationService.java:78)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.validateMigration(ConfigMigrationService.java:37)
at com.codebarrel.automation.api.service.TransferUserService.lambda$validateTransfer$0(TransferUserService.java:40)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
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)
...
OR
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
2024-05-31 09:55:29,156-0300 http-nio-8080-exec-16 url: /rest/cb-automation/latest/configuration/transfer/validate; user: jiraadmin ERROR jiraadmin 1216x137335x1 1qtloz6 0:0:0:0:0:0:0:1 /rest/cb-automation/latest/configuration/transfer/validate [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Cannot invoke "com.codebarrel.automation.rulecomponent.jira.action.assign.AssignConfig$AssignType.ordinal()" because the return value of "com.codebarrel.automation.rulecomponent.jira.action.assign.AssignConfig.getAssignType()" is null
java.lang.NullPointerException: Cannot invoke "com.codebarrel.automation.rulecomponent.jira.action.assign.AssignConfig$AssignType.ordinal()" because the return value of "com.codebarrel.automation.rulecomponent.jira.action.assign.AssignConfig.getAssignType()" is null
at com.codebarrel.automation.rulecomponent.jira.action.assign.AssignConfigTransform.validateMigration(AssignConfigTransform.java:54)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.lambda$validateComponent$2(ConfigMigrationService.java:86)
at java.base/java.util.Optional.map(Unknown Source)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.validateComponent(ConfigMigrationService.java:86)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.lambda$validateComponents$1(ConfigMigrationService.java:77)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.validateComponents(ConfigMigrationService.java:78)
at com.codebarrel.automation.api.component.migrate.ConfigMigrationService.validateMigration(ConfigMigrationService.java:37)
at com.codebarrel.automation.api.service.TransferUserService.lambda$validateTransfer$0(TransferUserService.java:40)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
...
Cause
There are rules with null Assign Issue action. Exporting the rules as JSON shows "assignType":null.
Solution
Export all rules to a JSON file and open it
Navigate to Administration > System > Automation rules
Click on Actions -> ... > Export Rules
Open the file and look for assignType
Check the entries with null values next to the assignType("assignType":null) and look at the associated rule name
Through the Jira UI, go back to Administration > System > Automation rules
Go to the affected automation rules having null Assign Type identified in the JSON file
Select a specific user within the options of the Assign Issue action (they'll be probably already filled with a valid entry once you click on the rule action)
Save the changes by publishing the rules
Retry the Transfer User functionality.
Was this helpful?