Emailing all the comments to the customer

Deleted user March 15, 2018

The content of the email that the client wants to receive is the whole trail of comments between the agent and the customer.

I am thinking that every comment is stored to a field and add symbols like this "*****" on top of each comment that will serve as a division. Can I achieve such functionality through script runner?

And if yes, can I add this field as well in the post function email?

Thank you in advance! 

1 answer

0 votes
Alexey Matveev
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.
March 15, 2018

In the post function email you can just get all comments from the issue and send them:

String comments = "";

ComponentAccessor.getAttachmentManager().getAttachments(issue). {

  comments += it.getBody()

}
Deleted user March 16, 2018

Hi Alexey,

Could it be that you are meaning the CommentManager and not the AttachmentManager?

I tried your code snippet, and could not get it to work (ex. the object Attachment does not have the method getBody() implemented).

Regards,

Julian

Alexey Matveev
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.
March 16, 2018

You are right, it must be CommentManager:)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events