I have two types of issues: "Ticket" and "PCR". When I create a PR for a ticket, I create a PCR using an automation. I link a Ticket and a PCR through the linked issues field
Later on the flow, I call a webhook to update the status of my ticket, and I want to update the status of the PCR as well. In order to do that, I created this automation:
In the first step I receive the Tticket number through the body of the webhook request, the I transition the Ticket, then I use the JQL
issue in linkedIssues({{triggerIssue.key}},"is included in")
and lastly I use an HTTP request to update the PCR status.
The problem I'm facing is that the JQL is not returning what I expected, given that I see this on the audit logs for the automation:
As I described, there IS a linked issue for RFM-38, which should be RFM-39, but for some reason the JQL can't find it. Can someone help me?
Can you do normal JQL search in Jira by the ticket to see if you are getting RFM-39? I dont see any issue with your query..
issue in linkedIssues("RFM-38","is included in")
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ramon Mengarda I just checked and yes, the if condition though passes, its not doing next steps for me as well. While we think that through...
Can I suggest, instead of If Condition with JQL, change it a branch -> for linked issues -> link type = "is included in"..
and then you log to see if its working?
I tested and this worked..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course below screen shot shows different link type, but something similar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked like a charm, and it's a more elegant solution to my problem, so I'm taking this as standard now lol. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thinking further on original issue, *my theory* is that for linked issues check, there is a specific If condition.. If "linked issues present"..
so if we just want to check if certain link type exists, we have to choose that option instead of JQL route.. (not sure why)
and if we have to loop through all linked issues, we branch like you did.
So I guess in summary, if you have to "send web request" for each linked issue --> branch,
And if all you need to do is send just 1 web request, use the If -> linked issues present check..
Learnt this behavior through your post, thanks!.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I note in your Send Web Request action, you appear to be trying to use the result of a Lookup Issues action in the URL. But the rule has not used that action first.
If you need that, please write JQL to find the relevant issue(s), add the Lookup Issues action to find them, add a condition to confirm issues were found, and then use that result in your URL.
I noted the smart value in your URL is also incorrect as it has a typo. This may be the one you wanted:
{{lookupIssues.first.key}}
Kind regards,
Bill
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.