Hi All,
Am trying to create 3 linked issues using clone script runner on post-function,
I added a condition on each post function: in case I change one field the post function related will execute successfully in case I modify 3 fields 3 related issues should be created. this is the happy scenario. what is really happening that in the second scenario only the first condition is executed while the others is not.
thank you.
Can you post the three conditions you are testing?
Also check the jira log files for any errors thrown during the transition.
Hi Tom thank you for your reply no errors found all green, I attach the conditions
thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see you are looking for the last change history on each case but the action of cloning with a link may be adding to the change history so affecting subsequent checks. I’d need to get to a server to prove that. Can you log the change history in each function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tom,
what you mean in log the change history, you need me to add log.error() of what, sorry am new in Jira :)
thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used log.error on each function the first and third functions returned:
2019-03-10 19:54:03,894 ERROR [workflow.ScriptWorkflowFunction]: [com.atlassian.jira.issue.history.ChangeItemBean@3fab96f8[fieldType=jira,field=status,from=1,fromString=In Progress,to=1,toString=In Progress,created=2019-03-10 19:54:03.13], com.atlassian.jira.issue.history.ChangeItemBean@415709d3[fieldType=custom,field=PC,from=[12526, 12530],fromString=Internet Access,Citrix Access,to=[12530],toString=Citrix Access,created=2019-03-10 19:54:03.13], com.atlassian.jira.issue.history.ChangeItemBean@7aed0420[fieldType=custom,field=Procurement,from=[14605, 14606, 14607, 14609, 14610],fromString=Printer,IP Phone,Mobile,Laptop,Screen,to=[14605, 14606, 14607],toString=Printer,IP Phone,Mobile,created=2019-03-10 19:54:03.13], com.atlassian.jira.issue.history.ChangeItemBean@4205941b[fieldType=custom,field=IT Software,from=[14620, 14819, 14820, 14617, 14618, 14824, 14616, 14823, 14825, 14826, 14827],fromString=Airas,Airas Test,Bank Med,Dynamics CRM,IMACC,IMACC Stock,Jira,MACC Payroll,Raga,SAS,YES,to=[14620, 14819, 14820, 14617, 14618, 14824, 14616, 14823, 14825],toString=Airas,Airas Test,Bank Med,Dynamics CRM,IMACC,IMACC Stock,Jira,MACC Payroll,Raga,created=2019-03-10 19:54:03.13]]
Cancel
the second
2019-03-10 19:54:03,894 ERROR [workflow.ScriptWorkflowFunction]: [com.atlassian.jira.issue.history.ChangeItemBean@3fab96f8[fieldType=jira,field=status,from=1,fromString=In Progress,to=1,toString=In Progress,created=2019-03-10 19:54:03.13], com.atlassian.jira.issue.history.ChangeItemBean@415709d3[fieldType=custom,field=PC,from=[12526, 12530],fromString=Internet Access,Citrix Access,to=[12530],toString=Citrix Access,created=2019-03-10 19:54:03.13], com.atlassian.jira.issue.history.ChangeItemBean@7aed0420[fieldType=custom,field=Procurement,from=[14605, 14606, 14607, 14609, 14610],fromString=Printer,IP Phone,Mobile,Laptop,Screen,to=[14605, 14606, 14607],toString=Printer,IP Phone,Mobile,created=2019-03-10 19:54:03.13], com.atlassian.jira.issue.history.ChangeItemBean@4205941b[fieldType=custom,field=IT Software,from=[14620, 14819, 14820, 14617, 14618, 14824, 14616, 14823, 14825, 14826, 14827],fromString=Airas,Airas Test,Bank Med,Dynamics CRM,IMACC,IMACC Stock,Jira,MACC Payroll,Raga,SAS,YES,to=[14620, 14819, 14820, 14617, 14618, 14824, 14616, 14823, 14825],toString=Airas,Airas Test,Bank Med,Dynamics CRM,IMACC,IMACC Stock,Jira,MACC Payroll,Raga,created=2019-03-10 19:54:03.13]]
I think am going to replace these 3 post function (clone and link issue) with one post function what do you think?
thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry about slow response, had to do day job!
As you are creating issues in different projects I don't think you have the option of using one post function without a lot of coding.
Can you log.info the conditional clause
i.e.
changeItem.find{it.field == "Procurement"}
and establish whether they are evaluating as you expect
Alt syntax is
{it.field.equals("Procurement"}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tom Lister ,
in case i would like to map fields from main tickets to related tickets using script runner:
1. Option1=Insight object
2. Option2= Multiple selection
3. Option3 = User
any help, thank 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.