Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Proper formatting for HTML email PLUS Time formatting

Craig Weston May 23, 2018

HI!

I'm building an automated form that presents information and a timeline to users in certain conditions. The information is emailed to them - its for execs on the go. When I add custom time fields ( or any time fields really, it isn't just a custom field) I get the "jiraDateTime" format.

    <td class="tg-7fey" colspan="2">{{issue.customfield_1186}}</td> 

 Above is the line impacted.  If I add formatting such as {{issue.customfield_11966}}longDateTime{{/}} I get errors - "Error rendering smart-values when executing this rule:Mismatched start/end tags: null != in template-7b3..."

 

My question is, what is the tag format to make this work? What I want is  

<td class="tg-7fey" colspan="2">{{issue.customfield_1186}}format=shortDateTime,zone={{reporter.timeZone}}{{/}}</td>  

 

I have tried escaping the trailing  /  such as {{\/}} but this just runs for 5 minutes and returns no results. 

If I leave off the trailing slash it runs but (as I would expect) prints the text following the field.

I have tried the single format and the more formal format = statements, as well as a number of the commands on the page https://docs.codebarrel.io/automation/smart-fields/working-with-dates.html

Thank you for your ideas.

1 answer

1 vote
Nick Menere
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 24, 2018

Hi Craig,

I think you are just missing the #:

{{#issue.customfield_11966}}longDateTime{{/}} 

 

Let us know how you go.

 

Cheers,

Nick

Craig Weston May 24, 2018

you are correct Nick, Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events