Hello All!
I am creating an automation that part of the flow will search for some stories based on criteria and then create one story in a different project that combine information from all the found stories. After that I would like to link the new story to all the stories that I created it from. So the linking part as what is not working. I am able to get the list of all the stories from the JQL an store in in the variable, but for some reason when I use Link Issue action, only the first story in the list get to be linked. I would appreciate any suggestions.
Thank you in advance!
Hello @David Yacubovich
Welcome to the Atlassian community.
Can you show us the entire rule, please?
Also, please show us the details for the creation of the varTarget variable.
And, please show us the output in the rule execution log for the execution of this rule.
Hello @Trudy Claspill ,
Thank you for your response. I am attaching items 2 and 3. I am not sure anything above that will help to debug the issue. As you can see in the screenshot, I am setting the varTarget to the value of lookupIssues, and in the log I can see that it is set correctly.
Thakn you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't believe that the Link Issue action can take multiple issue keys as an input. The documentation implies that you can create a link to a single issue.
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Link-issues
The reason I asked to see your entire rule was so that its current construction would inform any recommendation I made to you concerning how to link to multiple issues.
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.
Thank you, that is helpful.
My initial suggestion was going to be to use a branch to iterate through the results of your Lookup Issues action and link each one to the newly created issue. Unfortunately you rule is already in a branch at that point, and you cannot nest a branch within a branch.
Thinking out loud....
I wonder if there might be a clever solution here where you
1. Create a variable to contain the JQL of that the Lookup Issues action that gets the issues you want to link to the new issue.
2. You create a another rule that uses a webhook as its trigger.
3. Where you have the Link Issue action, you replace that with a Send Web Request action which you use to call the webhook of the new rule. In that webhook call you provide the JQL variable and the issue key of the newly created issue as parameters.
4. In that second rule, your run a Lookup Issue action to execute the supplied JQL.
5. In that rule you use a branch to iterate through those results, linking each one to the newly created issue, which you have supplied as another parameter when you called the rule's webhook.
I haven't actually tried this out. A colleague of mine recently created a rule that needed to call a JIRA API endpoint that will need multiple calls because the data will be paginated. He set up another rule with a webhook trigger and called it from the first rule to get the next page of data. He provided data to the rule's webhook to tell it how to make the next API call for the next page of data.
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.