Last comment in mail notification

Ganesh
Contributor
November 25, 2021

Hi Community!!

My task is to set the notification mail and I have achieved this Email issue (JMWE app) postop!!

In notification mail I have to send last comment and I m able to achieve this by this groovy script ${issue.getAsHtml("Last Comment")}

however, I m not receiving last comment instead I m receiving last second comment!!!

EX: I m not receiving notification mail from comment box which is placed in transition screen while executing the transition!!! instead I m receiving notification mail from the comment box which is placed at the bottom of the ticket!!!

My question is what/where do I need to make changes in order to get the notification mail from comment box in transition screen!!!

Thanks in advance!!!

Regards

ganesh!!

 

2 answers

1 accepted

0 votes
Answer accepted
Suprija Sirikonda _Appfire_
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.
November 25, 2021

Hi @Ganesh ,

Use the below template to get the comment added on the transition screen

${transientVars.comment}

 Regards,

Suprija

Ganesh
Contributor
November 25, 2021

Hi @Suprija Sirikonda _Appfire_ 

Thanks for your time to writing to me!!!

Hope you are doing great!!!

The code which you shared me working absolutely fine for my case!!!!

Could you please suggest me is there any way we can make this code few changes to get output in italic mode??

Suprija Sirikonda _Appfire_
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.
November 25, 2021

Hi @Ganesh ,

Yes, you can use <i> HTML tag to output the data in italic mode.

transition comment : <i>${transientVars.comment}</i>

 Hope this helps!

Regards,

Suprija

Ganesh
Contributor
November 25, 2021

Hi @Suprija Sirikonda _Appfire_ ,

Above code works absolutely fine!!! I appreciate for you time!!!

Keep supporting us!!! Thanks!!

0 votes
Atlassian TMG February 23, 2024

How do you do this in Jira Cloud?

Atlassian TMG February 23, 2024

I've solved it with this code:

{{ issue.fields.comment.comments | last | field("body") }}

Suggest an answer

Log in or Sign up to answer