Error when using the Add/remove from sprint post function on workflow

Krishan Patel June 14, 2021

I am attempting to use the Add/remove from sprint post function to add a ticket to the current active sprint when it is moved in progress. However when I try it I get this error.

 

2021-06-09 08:25:12,392 ERROR [workflow.AbstractScriptWorkflowFunction]: Workflow script has failed on issue <> for user '<>'. View here: <>
java.util.NoSuchElementException
at io.atlassian.fugue.Either.getRight(Either.java:552)
at io.atlassian.fugue.Either$RightProjection.get(Either.java:900)
at com.atlassian.greenhopper.service.ServiceOutcomeImpl.getValue(ServiceOutcomeImpl.java:178)
at com.atlassian.greenhopper.service.ServiceOutcome$getValue.call(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.utils.agile.AddRemoveFromSprint.execute(AddRemoveFromSprint.groovy:271)
at com.onresolve.scriptrunner.canned.jira.utils.agile.AddRemoveFromSprint$execute$2.call(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.AddRemoveFromSprintProxy.execute(AddRemoveFromSprintProxy.groovy:87)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.AddRemoveFromSprintProxy$execute$1.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.AbstractWorkflowCannedScript.execute(AbstractWorkflowCannedScript.groovy:23)
at com.onresolve.scriptrunner.canned.jira.workflow.AbstractWorkflowCannedScript$execute$0.call(Unknown Source)
at com.onresolve.scriptrunner.jira.workflow.AbstractScriptWorkflowFunction$_run_closure2.doCall(AbstractScriptWorkflowFunction.groovy:89)
at com.onresolve.scriptrunner.jira.workflow.AbstractScriptWorkflowFunction$_run_closure2.doCall(AbstractScriptWorkflowFunction.groovy)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl$_execute_closure1.doCall(DiagnosticsManagerImpl.groovy:359)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl$_execute_closure1.doCall(DiagnosticsManagerImpl.groovy)
at com.onresolve.scriptrunner.runner.ScriptExecutionRecorder.withRecording(ScriptExecutionRecorder.groovy:13)
at com.onresolve.scriptrunner.runner.ScriptExecutionRecorder$withRecording.call(Unknown Source)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl.execute(DiagnosticsManagerImpl.groovy:357)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsExecutionHandler$execute$3.call(Unknown Source)
at com.onresolve.scriptrunner.jira.workflow.AbstractScriptWorkflowFunction.run(AbstractScriptWorkflowFunction.groovy:82)

 

When I flip the function and try to remove the issue from its current sprint when it is moved to in progress that works fine.

 

This is my configuration:

image.png

1 answer

0 votes
Niranjan
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.
June 14, 2021

Hi @Krishan Patel ,

Ensure that you have schedule permissions. The function will pick the first active sprint from that board

 

https://docs.adaptavist.com/sr4js/latest/features/workflows/post-functions/built-in-post-functions/add-remove-from-to-active-sprint

Krishan Patel June 15, 2021

Hi, I am running it as the project lead who has the permissions to manage sprints.

Suggest an answer

Log in or Sign up to answer