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

Automation e-mail to a Jira group from a smart field

Chad Jackson July 1, 2022

I am trying to create an automation that sends notification to a group of users when the Team assignment field changes.

  • All Teams=a managed Jira group which individually set work
  • The automation is triggered by the field Team change - Automation kicks off and fails with error that the field may be empty.
  • When the automation triggers it's to send an e-mail. - I am trying to use a smart value to pull in the group from the Team field. Values tried so far with same results.
    • {{issue.custumfield.Team.value()}}
    • {{issue.custumfield.Team.currentUser()}}
    • {{issue.custumfield.Team.currentGroup()}}
    • {{issue.custumfield.Team.name()}}

In the issue the value is not empty I am sure it's me using the wrong value but not sure what it could be?

Edit: inspecting the page I found to be getting updated. using this new info I am still getting the error field may be empty.

"customfield_11901":{"id":"3","title":"IT Tools Team"

img1.jpg

Edit: Inspecting the page I found the following being updated. 

"customfield_11901":{"id":"3","title":"IT Tools Team"

 Using this new info I changed my automation to create a variable  of  {{issue.customfield_11901.title}} which returns my Group Name. (IT Tools Team) I am trying to use the variable {{GroupName}} for the To address.

I think the issue is when I manually want to add it shows in a list and then it needs to be selected. With the smart value I think the value is being added but not selected. Giving me the empty value.

 

 

inm2.jpg

1 answer

0 votes
Agraj Mangal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 4, 2022

Hi @Chad Jackson 

Apologies but I'm not sure I completely understand the problem

1. Firstly to find out about the custom fields for your issue - please check this documentation https://confluence.atlassian.com/automation/smart-values-for-fields-993924665.html - it helps you extract smart values from the REST API. 

2. How have you defined the {{GroupName}} variable which you are using to Send email - does it resolve to an email address ? 

Chad Jackson July 6, 2022

@Agraj Mangal  working with Atlassian support we were able to get this working.

My variable {{GroupName}} is being populated by the title value of a field.  That value is the name of a Shared Team, We have Jira User Groups that match the naming of our Shared Teams. Well the To: e-mail field I guess was seeing this as a string rather than a smart value? and not populating the field.

Our workaround was to create a new field (Group Picker) singular) and populate that with the variable {{GroupName}} then using the field to populate the To: value for the e-mail notification for said group. 

 

The purpose of this is to notify a support team of an issue assignment to their group

Like Agraj Mangal likes this
Arnoldo Benitez Valero
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2024

Hi @Chad Jackson  

Could you please elaborate more on this?. I tried what you said but the To: field in the send email action is not recognizing my new custom field (Group Picker) so I'm getting an error saying that the To field is empty.

Thanks in advance for your help.

Mike Herman May 21, 2024

I'm facing the same issue, and I'm wondering... did you ever get this work?  Thank you.

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.
May 22, 2024

Hi @Mike Herman -- Welcome to the Atlassian Community!

As this is a very old thread, I recommend creating a new question to ensure the maximum number of people see it to offer suggestions.

When you create you new question, please include:

  • what problem your rule is trying to solve; that is, "why do this"
  • a link back to this thread, if you believe that will help provide context
  • an image of your complete automation rule, in one image file
  • images of any relevant triggers, branches, conditions, and actions
  • an image of the audit log details showing the rule execution
  • explain how the rule is not working as expected

Those will provide context for the community to help.  Thanks!

Kind regards,
 Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events