copy comment to linked issue

Pumper1 November 20, 2017

I have two projects Project A and Project B. When i write comment in project A start transaction from Actiwe to Waiting for customer. And i need to copy this comment to project B while this transaction. Use Scrip Runner post function: "Adds a comment to linked issues when this issue is transitioned"  and code:
Last Comment:
<% out << transientVars.comment
%>

Its return null.

can anybody help me?

1 answer

1 accepted

0 votes
Answer accepted
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.
November 20, 2017

Hello, 

I tried like this 

<% out << transientVars.get("comment")%>

 

and it worked for me

Pumper1 November 20, 2017

Hello,

thank you for your answer, but here is also NULL.

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.
November 20, 2017

You can try like this

<% out << com.atlassian.jira.component.ComponentAccessor.commentManager.getComments(issue).last().body %>

Like # people like this
Pumper1 November 21, 2017

It works, thank you!!

Stephen Letch January 22, 2019

does this code accommodate service desks public vs internal comment?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events