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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

What's wrong with my Jira automation smartvalues?

Edited

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.
Feb 04, 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.
Mar 05, 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