Issues with creating an issue link
Hi Fidel,
I hope you can help me. I’m running an evaluation version of the Jira Workflow Toolbox and I’m trying to add a post function to link newly created issues with existing issues of a certain type if they are logged against the same Organization. I don’t get any errors, but the link isn’t getting created.
Below is the function as it shows in the Post Functions list:
Current issue will be linked with issue link type relates to to every issue returned by JQL query Organizations = "%{Organizations}" AND Type = "Support Contract". Post-function will only be executed if the following boolean expression is satisfied: %{Project name} = "Customer Support" This feature will be run as user in field Project leader.
Please can you help.
Regards,
Andy
Comments (18)
-
repo owner -
reporter Hi Fidel,
To answer your questions:
Type of field "Organizations". Is it a custom field? This is the built in field that comes with Service Desk
Type of field "Type". Is it a custom field? This is the built in field for the Issue Type
Tell me whether JQL query works when executed manually with an example value for %{Organizations}. Yes, I have confirmed that there is a single issue in the result set when I run a JQL query with a valid value in place of %{Organizations}.
-
repo owner Hi @apsimpkins,
Please, attach an XML export of your workflow.
-
reporter Hi Fidel, please find the XML attached. Thanks.
-
repo owner Hi @apsimpkins,
You should use 2 post-function with the following configurations:
Post-function 1:
Is a "Copy a parsed text to a field" post-function with the following string expression is advanced parsing mode:
toString(textOnStringList(toStringList(%{nnnnn}, ","), "\"" + ^% + "\""), ", ")
replacing nnnnn with field code for Organizations field.
This post-function sets Ephemeral string 1 virtual field with a comma separated list of organizations between double quotes, i.e.,
"
.Post-function 2:
Is a "Create issue link" post-function with the following JQL query:
Organizations in (%{00061}) AND type = "Customer Support"
where
%{00061}
is field code for Ephemeral string 1. -
reporter Thanks very much Fidel, I will try this and let you know how I get on.
-
reporter Hi Fidel,
Sadly, I still can't get this to work.
I have configured the following as per your instructions:
Test to be parsed and then copied to target field:
toString(textOnStringList(toStringList(%{10002}, ","), "\"" + ^% + "\""), ", ")
JQL for issues returned on destination end:
Organizations in (%{00061}) AND Type="Support Contract"
Am I missing something here?
Thanks,
Andy
-
repo owner Please, attach a screenshot with the whole post-function's tab. I would like to see all the post-functions you are executing in the transition.
Also, try setting New comment at parameter Target field in the first post-function. This way you will get an automatic comment where you will be able to see the value we store in Ephemeral string 1. Please, do it and share it with me.
-
reporter Hi Fidel,
Here's the entire post-function tab as it stands. As you will see, the target field is currently 'New Comment', which worked as expected (it added a new comment with the expected organization name in it). I had to re-order the functions to get it to post the value into a new comment, which is why 'Creates the issue originally' step is now at position 2. It was previously step 4.
Thanks,
Andy
-
repo owner Hi @apsimpkins,
Post-function "Creates the issue originally" should almost always be in first position in execution order.
Please, try moving "Creates the issue originally" to first position in execution order, and restore Ephemeral string 1 as Target field, then try again the solution, and let me know if it works as expected.
-
reporter Hi Fidel,
I have updated the workflow as you suggested and unfortunately, it's still not working.
Any suggestions for what to do next please?
Thanks,
Andy
-
repo owner Hi @apsimpkins,
I don't understand why it's not working in your case. I have tried exactly the same configuration on JIRA 7.4.3 with JWT 2.2.44 and it works perfectly.
Please, attach an xml export of your workflow.
-
reporter Hi Fidel,
I've just checked the version of JIRA that we are running and it's 7.3.2, could this be the issue?
Please find the XML export attached.
Thanks,
Andy
-
reporter -
reporter Hi Fidel,
Any thoughts on how to progress this?
Thanks,
Andy
-
repo owner Hi @apsimpkins,
I don't find any problem in your configuration. Can we have a screen-share through Skype? I would like to see the problem in direct.
My Skype user is fidel100r. Please, propose a time to arrange a meeting.
-
reporter Hi Fidel,
I have updated the JWT add on and the linking function now appears to work.
Thanks for all of your help.
Regards,
Andy
-
repo owner - changed status to resolved
Great! I close the issue.
- Log in to comment
Please, provide the following information: