You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I'm trying to clone an issue using
com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue
void cloneIssue (MutableIssue issue, def parent) {
def params = [
issue : issue,
//(CloneIssue.FIELD_PARENT) : parent,
(CloneIssue.FIELD_SELECTED_FIELDS) : null, //clone all the fields
] as Map<String, Object>
new CloneIssue().doScript(params)
}
But I cannot for the love of god find where the properties are documented. I need to change the parent of the issue when cloning.
Thank you
There is no public documentation for this, but all their canned scripts pretty much follow the same template. The doscript params is a map of FIELD : value.
You can get the list of fields using the scriptrunner console's autocomplete.
To answer your other question, I've never seen a cloning feature in jira (built-in or add on) that copied the full history. But in theory, but you can use:
The rub is that I don't see how you can set the date/time of the change history. Each changegroup you create would have a new timestamp.
That's probably why, generally, cloned issues preserve a link to the issue they were cloned from so one could follow the clone link and consult the history there.
Thanks for the response. I'm just going to roll with no history for now. I've never seen autocomplete in the script console. Do I need to enable it or something? Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's enabled by default in newer versions.
Usually, after upgrading, the console will have a large announcement panel that shows he shortcuts.
You can find the details here: https://scriptrunner.adaptavist.com/latest/jira/code-editor.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I actually solved this issue but I've ran into another. So CloneIssue does not copy the history of the original issue. Is there anyway to add this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.