Remove duplication in @mention in slack

Nguyen Thanh Tien
Contributor
October 11, 2024

Can anyone advise me on how to modify the JQL (image 1) to remove duplicate entries for <@U019B3C6TJM> and @Tien Nguyen Thanh (image 2)

 

Screenshot at Oct 11 17-44-35.pngScreenshot at Oct 11 17-44-49.png

1 answer

1 accepted

1 vote
Answer accepted
Tobias H
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.
October 11, 2024

Hi @Nguyen Thanh Tien, my guess would be that you need to add a custom variable in which you break out distinct from, so when called too it only finds one entry instead of the the user * the number of looked up issues.

Because right now it seems like you make the distinction BEFORE the last lookup issue, which means that lookup issues is filled with the users name, rather than just one name.

Nguyen Thanh Tien
Contributor
October 11, 2024

hi @Tobias H , could you provide detailed guidance on how to "add a custom variable in which you break out distinct from"?

Tobias H
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.
October 12, 2024

Yeah sure!

Sorry for being unclear, I thought you would know as you already were using distinct smart values in your automation.

And after some testing, I don't think you need to create any variable, just try to add .distinct in the Slack message. So instead of <@{{lookupIssues.customfield_11068}}> have it say <@{{lookupIssues.customfield_11068.distinct}}>. That should ensure that the Slack ID is only entered once, making sure that you can use it to ping in Slack.

Also, what is the purpose of the second part, where you list all the lookupIssues and ping the user again? Isn't the initial ping enough?

Nguyen Thanh Tien
Contributor
October 12, 2024

It has worked, thank a lot @Tobias H 

p.s for the second part,  it's just a test :)

Like Tobias H likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events