Hello all -
I am using ScriptRunner for jira (version 5.5.5) , trying to auto-clone issues from one project to another under specific conditions.
I followed some guidelines I've found to create such a post-function but I could not make it.
What I am specifically trying to do is:
whenever a customer ticket (type in (Bug,Improvement) AND "Service case id" is not EMPTY AND blocking =Name) of the ProjectA is turned to "Resolved" with resolution=fixed, a clone on the ProjectA to the ProjectB should be created automatically and vice versa.
Probably for the cloning we'd need to fill in the "version" field. If it is not trivial to get the latest version of each project, then we just put a specific version eg "version1".
Could someone help?
Thanks is advance,
Iro
Hi @Iro Karavasili
I think this is a complete answer for what you are looking.
https://community.atlassian.com/t5/Jira-questions/Create-issue-in-another-project-with-Script-Runner/qaq-p/586820
Let me know if it helped you.
Thank you @Gustavo Félix , this was really helpful.
What I am also trying to do is to add some Conditions when cloning the issue.
I use this:
cfValues['Service Case ID'] != null && cfValues["Blocking"] == "ABC"
But it didn't work.
As far as I understand the problem is here cfValues["Blocking"] == "ABC"
When I use the first part of the condition cloning works fine.
When I add the 2nd condition (even without the 1st part) cloning does not work.
I also tried to use cf's id with no success:
cfValues[12345] == "ABC"
Could you help with this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What field type is cfValues["Blocking"] ? @Iro Karavasili
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but is it a textfield , a select, checkbox, etc ?
It changes the way you can get the value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a checkbox field. The screenshot I sent is a little bit small I suppose.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I didnt see It.
You can try cfValues['Field name'][0] == 'SomeValue' or cfValues['Field name']?.value == "Some value"
Let me know if this helps you.
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.