Hello,
I'm doing Jira automation scripts for Data Center instance. I have a script that is supposed to send a Slack message when JQL condition of "Resolution in (Duplicate)" in a match. However, I'm not getting the results what I'm hoping for. Details below:
Script for Slack message:
:two: <{{issue.url}}|{{issue.key}}> has been resolved by {{initiator.displayName}} as *DUPLICATE*.
It {{issue.issuelinks.type.inward}} <https://my.atlassian.net/browse/{{issue.issuelinks.outwardIssue.key}}|{{issue.issuelinks.outwardIssue.key}} {{issue.issuelinks.outwardIssue.fields.summary}}>.
What I'm expecting to see:
:two: PROJECT-123 has been resolved by Initiator as DUPLICATE.
It is duplicated by PROJECT-1234 This is the duplicate issue.
What I'm currently seeing:
:two: PROJECT-123 has been resolved by Initiator as DUPLICATE.
It .
Smart values:
issue.issuelinks.type.inward = "is duplicated by"
issue.issuelinks.outwardIssue.key = PROJECT-1234
issue.issuelinks.outwardIssue.fields.summary = "This is the duplicate issue"
---
So what am I doing wrong? Are the smart values in wrong format? Should they be #issue or #issuelinks instead?
Thank you!
// Jenni
The documentation for using issueLinks in Smart Values is severely lacking right now -- please provide feedback to Atlassian at the bottom of those documentation pages! Server/DC page here, Cloud page here.
Perhaps issue.issuelinks.outwardIssue might be a list? So perhaps Smart Value list traversal is needed? Server/DC docs here, Cloud docs here.
It might be coincidence that {{issue.issuelinks.outwardIssue.key}} appears to resolve as a scalar (not list) value when there is just one item in the list.
Yes, and...to what Mykenna notes:
I tried your complete expression with a Jira Cloud rule and it works as you expected. The only hiccup was when I had multiple linked issues outward...in which case it concatenated all of the results (i.e. no list iterator needed).
I recommend talking to your site admin to submit a ticket to support for this one to uncover the problem.
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.