It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

copy comment to linked issue

Taras Gural Nov 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 [cPrime] Community Leader Nov 20, 2017

Hello, 

I tried like this 

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

 

and it worked for me

Taras Gural Nov 20, 2017

Hello,

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

Alexey Matveev [cPrime] Community Leader Nov 20, 2017

You can try like this

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

Taras Gural Nov 21, 2017

It works, thank you!!

Stephen Letch Jan 22, 2019

does this code accommodate service desks public vs internal comment?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar invitation: Generate custom Jira Cloud PDF reports and exports

Jira may be a staple part of your workday, but your colleagues, customers, business partners or an auditor might need information presented in a different format, that is easy to access and read. And...

59 views 0 1
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you