I got some issue with post functions for clone issue. I would like to get some values from orignal issue.
The exemples provided gives me a hint to use sourceIssue.*
Using for example issue.Summary = "Change: " + sourceIssue.summary
gives me this error
[canned.jira.utils.ConditionUtils] Condition failed on issue: IVY-5, built-in script:com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue
java.lang.NullPointerException: Cannot invoke method contains() on null object
at java_util_List$contains$3.call(Unknown Source)
JIRA version 6.3.6
Script runner version: 3.0.5
Can you give some advice how to solve?
Below are a few lines of code that I use to create a clone of an issue in the post function. Please note that
issue is available in the post function scripts and refers to the current issue.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.IssueFactory def compAccessor = new ComponentAccessor() def issueFactory = compAccessor.getIssueFactory() // define clone def clone = issueFactory.cloneIssue(issue) clone.setSummary("[SR] " + issue.getSummary())
We are sharing mini new cloud roundups by use case to celebrate the Atlassian Marketplace's 10th Anniversary! This mini roundup is the fourth in a series of six. Check out others in the series based ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events