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

How to include custom field data in Jira automation email

Tylor Seastrum July 24, 2024

I am creating a change management project within Jira.
I have built some automations that will send an email containing the information about the ticket I want to populate this message with the necessary fields:


 

We would like to inform you of an important change regarding [specify what is changing, e.g., policy, procedure, system, schedule]. This change will take effect starting from [effective date]. For the effective date I would like to use the custom field: "Planned start"

Key Details:

  • What is changing: [Title of the change] 
    • Thinking about using: {{issue.summary}}
  • Reason for the change: [Explain why this change is happening]
  • Impact: [Describe how this change will affect the staff or operations]
    • Thought the description might be the best here: {{issue.description}}
  • Next Steps: [Outline any actions staff need to take or any important dates to remember
  • Contact Person/Department] at [Contact Information].
    • I do not have my jira instance set up to pull information from AD yet so I am unsure how to gather this and then send it out in an email.
    • I was thinking about adding the assignee name? 



I want to include the data from the custom field "Planned start" 
This custom field is a Date Time Picker
I am not sure how to find the ID for the custom field or the syntax for these either.
I want this entire email to pull from information from the ticket so it runs automatically without any external additions. 

 

 

 

 

 

 

2 comments

Adolfo Casari
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.
July 24, 2024

@Tylor Seastrum 

smartvalue is {{issue.customfield_xxxxx}}

to find xxxxx use this URL from your browser while navigating in Jira

<JIRA_BASE_URL>/rest/api/latest/field 

It will display all fields (system and custom) , find yours by its name and there it's the ID.

Like David Friedrich likes this
Tylor Seastrum July 24, 2024

@Adolfo Casari I am getting a blank screen. Is there a page within Jira to add this at the end of the URL for it to work or where can I find the Jira base URL. Thanks again.

David Friedrich
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.
July 25, 2024

Hi @Tylor Seastrum ,

as Adolfo already explained you need to work with smart values:
https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/

The base URL ist your Jira site: https://SITENAME.atlassian.net

Like Els Bassant likes this
Tylor Seastrum July 25, 2024

@David Friedrich Turns out the {{issue.Planned start}} did work 20 minutes after posting this!
It returned the value of: "2024-07-26T07:30:00.0+0000" Is there a way to modify this to only give the year-month-day and then the time? Or would I need another custom field? The problem with making a new custom field is that this custom field logs the start date and time on the Change calendar and I would not know how to make another one to tie it to again as I was not the one who set this up initially.  

David Friedrich
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.
July 25, 2024

Yes, you can. Check out this documentation of how to format dates:
https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/
No need to create a new customfield.
Try {{issue.Planned start.format("yyyy-MM-dd")}}

Or review 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/ for all the available date formats. According to that docu 

 

{{issue.Planned start.jiraDate}}

should also work.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events