Send Custom Email add Create date within email

I have a custom email that is being sent on resolution using the Script Runner Send Custom Email post function.

With in the email, I want to include the Created Date.  I tried using issue.createdDate and issue.created.date neither worked.  What do I need to use to get the date in the email?

Thank you!
Jenifer 

3 answers

1 accepted

2 votes

This is a rare occasion when you cannot use the property syntax - see my comment here: https://answers.atlassian.com/questions/251026/script-runner-how-do-i-pull-created-date-information-from-an-issue

Also, because OSWorkflow mangles the parameters, you need to do:

<% out << issue.getCreated() %>

Thank you! That worked, The date is showing date and time, annyway to to only show the date? Search is frustrating, I searched on Created Date and the question did not come up.

issue.getCreated().format("dd-MMM-yy")

Awesome! Thank you so much!

is it possible to send a custom email with different recipient. i mean changing them(recipient) is possible? 

Have you tried : 

$issue.getCreated()

 

It is telling me the same thing - No such property: getCreated for class: com.atlassian.jira.issue.IssueImpl

You are correct, sorry should have tested that before hand. Only one that work for me is $issue.created but it return : True and not a date. I will continue to try and make this work. Unless someone else find a solution before me

Which version of Jira are you using?

Maybe we should raise a flag for this issue, i have tryed all property of the com.atlassian.jira.issue Class IssueImpl.

Everyone of them give me an error like this: 

 

11111.png

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,754 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot