Tag team members in comment

I have enabled the custom field “Team” on my issues. Now I want to automatically tag all the team members whenever an issue is created with that field filled in.

I was hoping to do this via global automation, but no luck yet.

Does anybody know how to do this?

I have tried:

  1. When: Value changes for “Team”
  2. Then: Add comment to issue “[{{issue.Team.name}} | https://<instance_name>.atlassian.net/jira/people/team/{{issue.Team.id}}?ref=jira$&src=issue]”

Hi @WilkoVerheij ,

Welcome to the Atlassian Developer Community.

I think this is how you would want to set up the rule:

Regards,
Dugald

Hi @dmorrow ,

Thanks!

If I understand correctly, this adds a comment with just the text “Foo”. However, I want to comment the value of a field of my issue. Furthermore, that value is a team with members in it. So I don’t just want to comment the name of the team inside that field, but I actually want to tag/mention the team and all it’s members inside.

The reason for this is that I want the team to be notified (by mail) that they are assigned to an issue. So not only the actual assignee which is a single person, but the entire team. The assignee will always be part of the team that will be mentioned in the extra field.

Hope this additional info helps :slight_smile:

Kind regards,
Wilko

Hi @WilkoVerheij ,

If I understand correctly, this adds a comment with just the text “Foo”.

No, the yellow part of the rule is checking if the field “Foo” is not empty. If so, the rule continues to the blue step of adding a comment.

I wasn’t aware of the extra requirements you just specified so my screenshot does not reflect this. Automation comments allow you to include values from fields and it lets you send emails to people, but I don’t quite understand your requirements about who to send the email to, but sending to specific people like the current assignee and report is easy.

Regards,
Dugald

Hi @dmorrow ,

I know we can easily send an email to assignee and reporter, but I want to go beyond that.

I want my organisation to be able to automatically email an entire team (that is predefined) whenever an issue is created for them. Then they can think of who to assign the issue to internally.

My initial thought for this was to use the custom field “Team” for this, as this allows to specify the correct team per issue. Then add an automation rule that tags the specified team (and its members) in the comment of that issue, as tagging people in comments sends an email to them. However, I can’t make the comment actually tag entire teams automatically.

Do you know how to do this? Or do maybe know of another way of automatically emailing entire teams?

Thanks for the help.

Kind regards,
Wilko

Hi @WilkoVerheij ,

I’m not sure if this is possible by only using automation capabilities, but perhaps your automation can use the Send web request automation component to send an event to a webtrigger of a Forge app which you create. The Forge app could then make a request to the Jira REST API to add the comment containing the @mentions of the team members.

You may like to visit Automation with Forge.

Regards,
Dugald