Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation: Can we disable @mentioned_Users from issues that are created by automation?

Adrian Szubert October 21, 2024

Hello Community!

As my question states - I have a few follow-up tasks created automatically whenever a story reaches a specific status in the Workflow. 

If we tag a User in Story, it will automatically tag them in the follow-up story. 

It is quite annoying whenever the Product Owner or Business Process Owner is flooded with dozens of notifications on issues that are irrelevant to them at this stage.

Is there any way we can switch it off? 

 

Best regards,

Adrian

2 answers

1 accepted

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

Hi @Adrian Szubert 

If you look at the markup for a mention with Jira Cloud, it looks like this:

[~accountid:userAccountId]

And so in your rule that clone / reuse such descriptions, the rule could replace those using text functions, such as replaceAll() with a regular expression: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#replaceAll-String-regex--String-replacement-

For example:

{{issue.description.replaceAll("(\[~accountid:.+\])", " MENTION_REMOVED ")}}

If you want to replace the user-mention with their display name, I believe that is more challenging, and may only be possible if you have a limited number of users to handle.

 

Kind regards,
Bill

Adrian Szubert October 23, 2024

It works great! Thanks @Bill Sheboy

 

How would you approach "keeping" the name of the tagged User? As you mentioned, it is hard, but I wonder how that would look like

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.
October 23, 2024

Backing up a bit...as something appears to have changed since the last time I tried this scenario a few years ago.  Now this:

{{issue.description.text}}

Will lookup and replace the mentions with the users' display names.  However that will also remove all formatting from the field.  If you need to preserve the formatting...

 

Let's assume you only had a few users in your site / project.  In that case, you could chain together replacements.  This would work (and be very slow) for up to a few dozen users.

{{issue.description.replace("[~accountid:1234]", "Alice").replace("[~accountid:5678]", "Bob").replace("[~accountid:9801]", "Mallory")}}

Messy, redundant, brittle, difficult to maintain, and effective.

 

If you had up to 200 users, you could use a quite complicated approach using list iteration, lookup tables, and text functions.  I have not tried that for this scenario and would need to actually build the rule to confirm it works as expected.

 

0 votes
Marc - Devoteam
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 21, 2024

Hi @Adrian Szubert 

Are they the reporter of the follow-up stories or are they stated as watchers or are the issue linked or is it in the workflow, what is the case?

What kind of notifications are they getting?

Also what does the automation look like, is it somewhere in the automation that they are related to the follow-up stories

Adrian Szubert October 21, 2024

Hey @Marc - Devoteam 

No, they are just mentioned in the story's description, and the description (along with other fields) is cloned to the follow-up task - either QA Task or Smoke Test Task.

The tagging I mean is same as I mentioned you above - @UserName

 

Marc - Devoteam
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 21, 2024

Hi @Adrian Szubert 

Can you show example issues, as notification are triggered via email or as user being assignee, reporter or watcher.

@mention is a single notification, cloning via cloning option or via an automation rule should not keep @mentioned user notified.

What kind of notifications are the @mentioned users getting?

Adrian Szubert October 21, 2024

Hi @Marc - Devoteam 

It can be problematic to share those, without sharing some more confidential details.

What I can tell is that users are receiving Email notifications from the Automation User (as the Automation User is used for that).

It is exactly as mentioned, the User is mentioned in the Parent in the description field, cloning that field to a new story, and keeps sending those email notifications (also ring bells in JIRA itself).

2024-10-21_10h49_12.png

Marc - Devoteam
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 21, 2024

Hi @Adrian Szubert 

So it seems like there is an automation rule that is acting on this.

But if the automation rule is used to sent messages to users mentioned in the description, it will keep doing this on any issue where a user is mentioned.

So there is no option to stop this, only to disable or remove the automation.

Or as @Bill Sheboy mentions, adjust the rule that is used for copying make sure to remove the mentioned user.

Adrian Szubert October 23, 2024

Hello @Marc - Devoteam I have followed the suggestion of Bill and that works great.

Thank you for your support!

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events