Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×We have a few custom fields, we'll call them customfield_1, customfield_2, and customfield_3, all of them Date Pickers, that get referenced when using Send Email in Jira Automation. Here is a breakdown of each. :
customfield_1 is added when the ticket is filed by the Reporter.
customfield_2 and customfield_3 are both calculated in a separate piece of automation that runs before the email is composed and sent.
When the email is sent, the first customfield (the one that is input by the reporter) shows up okay but the others don't.
In the HTML for the email, they are all formatted {{issue.customfield_XXXXX.format("MMMM d, yyyy")}}, with the XXXXs being replaced with the respective customfield number.
I had put a delay in composing and sending the email thinking maybe it was firing off before the calculation could happen since they are separate branches but no dice.
All three customfields appear correct when I look at the ticket itself, with the correct values in each.
I have verified the IDs that are being referenced are the correct IDs.
Is there something I'm missing, like permissions to access a customfield or something? I'm relatively new to working with project administration and automation so your help is appreciated and let me know if there's any additional details I can provide. Thanks!
Hi Cody,
Are the two custom date fields set by the automation that is also sending the email? If that is the case you have to add a Re-fetch component before sending the email. The automation will only have the data about the work item when the automation triggers.
It's a separate branch within the same automation if that helps clarify. Here's a screenshot of the branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, so either before the branch or within the branch add the Re-fetch component, that way the automation will get latest state of the work item including changes made within the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That did it! I've been beating my head against this for a week. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the codeblock. I have changed the customfields IDs to match the references above.
<ul>
<li><span class="bold">Date:</span> {{issue.customfield_1.format("MMMM d, yyyy")}}</li>
<li><span class="bold">Due:</span> {{issue.customfield_2.format("MMMM d, yyyy")}} (Please schedule a meeting and complete the review form at least two weeks before this date)</li>
<li><span class="bold">Date:</span> {{issue.customfield_3.format("MMMM d, yyyy")}}</li>
</ul>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.