Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What's wrong with my Jira automation smartvalues?

Jenni Järvinen February 4, 2022

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

1 answer

1 vote
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2022

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.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2022

Hi @Jenni Järvinen 

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events