Copy from sprint fields failing with NPE

Description

Looks like copying the Sprint fields may fail with a null sprint

ComponentChainImpl:91 Unexpected runtime error executing component for config 'ComponentConfigBean{id='6989903', component=ACTION, parentId='6989900', conditionParentId='null', schemaVersion=6, type='jira.issue.create', value=IssueActionConfig{operations=[FieldOperation{fieldId='summary', fieldType='summary', type=COPY, value={type=COPY, value=current, additional=summary}}, FieldOperation{fieldId='description', fieldType='description', type=SET, value=TODO na wycenie}, FieldOperation{fieldId='project', fieldType='project', type=SET, value={type=ID, value=10009}}, FieldOperation{fieldId='issuetype', fieldType='issuetype', type=SET, value={type=ID, value=10005}}, FieldOperation{fieldId='assignee', fieldType='assignee', type=SET, value={type=ID, value=5b6853e24995de3c04445ee5}}, FieldOperation{fieldId='labels', fieldType='labels', type=COPY, value={type=COPY, value=current, additional=labels}}, FieldOperation{fieldId='customfield_10013', fieldType='com.pyxis.greenhopper.jira:gh-epic-link', type=SET, value={type=COPY, value=current}}, FieldOperation{fieldId='priority', fieldType='priority', type=COPY, value={type=COPY, value=current, additional=priority}}, FieldOperation{fieldId='issuelinks', fieldType='issuelinks', type=SET, value={issue={type=COPY, value=trigger}, linkType=outward:10201}}, FieldOperation{fieldId='fixVersions', fieldType='fixVersions', type=COPY, value={type=ADD, value=current, additional=fixVersions}}, FieldOperation{fieldId='customfield_10018', fieldType='com.pyxis.greenhopper.jira:gh-sprint', type=COPY, value={type=COPY, value=current, additional=customfield_10018}}], advancedFields='null', sendNotifications=false, useLegacyRendering=false}, conditions=[], children=[], optimisedIds=[]}': java.lang.NullPointerException
at com.codebarrel.automation.rulecomponent.jira.common.issueconfigfields.software.SprintField.lambda$getCopyFromValue$3(SprintField.java:161)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at com.codebarrel.automation.rulecomponent.jira.common.issueconfigfields.software.SprintField.getCopyFromValue(SprintField.java:162)
at com.codebarrel.automation.rulecomponent.jira.common.issueconfigfields.software.SprintField.lambda$addOperationToBuilder$0(SprintField.java:93)
at com.codebarrel.automation.rulecomponent.jira.common.issueconfigfields.util.CopyFromUtils.lambda$copyValue$2(CopyFromUtils.java:90)
at java.util.Optional.ifPresent(Optional.java:159)
at com.codebarrel.automation.rulecomponent.jira.common.issueconfigfields.util.CopyFromUtils.copyValue(CopyFromUtils.java:84)
at com.codebarrel.automation.rulecomponent.jira.common.issueconfigfields.software.SprintField.addOperationToBuilder(SprintField.java:89)
at com.codebarrel.automation.rulecomponent.jira.common.IssueFieldsBuilderImpl.lambda$buildRequest$2(IssueFieldsBuilderImpl.java:154)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.codebarrel.automation.rulecomponent.jira.common.IssueFieldsBuilderImpl.buildRequest(IssueFieldsBuilderImpl.java:135)
at com.codebarrel.automation.rulecomponent.jira.action.create.CreateIssueActionExecutor.buildRequestAndCreateIssue(CreateIssueActionExecutor.java:95)
at com.codebarrel.automation.rulecomponent.jira.action.create.CreateIssueActionExecutor.lambda$execute$0(CreateIssueActionExecutor.java:71)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.codebarrel.automation.rulecomponent.jira.action.create.CreateIssueActionExecutor.execute(CreateIssueActionExecutor.java:70)

Environment

None

Status

Assignee

Simeon Ross

Reporter

Mark Chaimungkalanont

Links

0

Fix versions

Configure