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

Automation and form fields question

Andy T
Contributor
June 28, 2024
Hi

 

      I'm new to Jira and trying to achieve the following:

Created a simple request type with first name, last name, date and title.

When the request is submitted, I was to create a jira automation where an email get sent out with the values of the 4 fields embedded in the body of the email.

The email automation works fine but I don't know how to insert the form values in the body.

I tried to check smart values but I don't see how to add these to the email.

Also, if I attach a separate form to the request type, can the values of that form be used in the automation process as well?

Thanks

3 answers

1 accepted

5 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2024

Hi @Andy T,

Welcome to Atlassian Community!

In order to include the fields in the body of the email just add them like this:

{{issue.first name}} {{issue.last name}} {{issue.date}} {{issue.title}}

In order to include answers from a form you would have to use the Forms API in order to extract those answers. You can find the documentation for the API here, https://developer.atlassian.com/cloud/forms/rest/intro/

Andy T
Contributor
June 28, 2024

Thank you Mikael for the quick reply. 

so the name of the field I want to include should come after "issue"?

Thanks, I will check the API solution as well.

Like John Funk likes this
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2024

Yes that is correct. And if you have fields with the same name or if the automation says that it cannot find the field then you can use the custom field Id instead. You can get that Id if you go to Settings > Issues > Custom fields, locate the field in question, then click on the three-dot menu and hover over one of the options. The URL displayed contains the Id at the end of it, it looks something like this:

customfield_12345

Like John Funk likes this
Andy T
Contributor
June 28, 2024

Thanks again. I was able to send the email fine with the information except for the date.

I don't see these fields in the custom fields section. Do I need to add it a custome field first?

Like John Funk likes this
1 vote
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2024

@Andy T -

Welcome to the community.  To supplement what @Mikael Sandberg suggested, here are the reference links (you may already have them already) on smart value + how to utilize log action to test out your automation rule using the audit log to test out the content of your smart values...

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/

Hope this also helps.

Best, Joseph Chung Yin

Andy T
Contributor
June 28, 2024

Thank you so much.

I will review these

Like John Funk likes this
0 votes
Andy T
Contributor
June 28, 2024

Thank you Mikael for the quick reply. 

so the name of the field I want to include should come after "issue"?

Thanks, I will check the API solution as well.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events