Does anyone know if the ScriptRunner clone issue creates the destination issue first then copies over the field values? Is it a two step process?
My destination project has an automation that changes the Assignee when a new issue is created.
The destination issue assignee is not being updated. It is retaining the Assignee from the source issue/project
Thanks
-Shawn J>
No, the clone is a single step, like it is in Jira's create and clone processes.
In the details of the clones, the code creates a "mutableissue" from the original issue which includes all the field content, and then sends that through the "create" process.
I think you need to look at your automation to see if it is actually being triggered when issues are cloned.
Rather, check that your automation was even run against that issue at all. When an issue is created, then it is the workflow which should publish the event (https://confluence.atlassian.com/display/ADMINJIRASERVER/Adding+a+custom+event), and then that automation can listen to events, and do it's thing. So the first step is just seeing if that automation ran against that issue at all. Second would be to verify that the workflow create step does in fact publish the Issue Created event.
If you were concerned about the issue being "overwritten" due to a 2-step process, you would see this in issue history. One action would update the assignee, another would change it after that. So this should also be an indicator.
All in all I doubt SR is a 2-step process, it probably just builds the field:value map and creates the issue with all of it's field data. It may use extra steps for issue links, but it most probably doesn't for the issue itself. I suspect your automation is simply not picking up on the new issue. If not, it's a missing event. When it's a missing event, the workflow should be responsible to publish one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Quick question, since you are using ScriptRunner to clone the issue, why not use it to set the Assignee as well when using, for example, a Post-Function?
Why use Automation only to set the Assignee?
If you need an example on how to do this, I can provide one.
I am looking forward to your feedback and clarification.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.