Add transition screen "Comment" to linked issues

Lakshmi S February 13, 2024

Hi Team,

I have set up a post-function on a transition screen to create a linked ticket in another project when a certain field has a value. However, when I add a comment during the transition, the comment is added to the original ticket instead of the linked ticket that was newly created. I want to copy the comment field text to the linked issue that is created. How can I achieve this requirement?

I used the "Clones an issue, and links" script runner post function to create a new linked issue in another project.

FYI, I have checked the option "Copy Comments", but it copies all comments from the original ticket to the linked ticket; we just want to copy the transition "Comment" text.

2 answers

1 accepted

0 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2024

Hi @Lakshmi S 

you can use a JMWE Create Issue(s) post-function with this configuration:

image.png

This will create the comment on the newly created issue and prevent the comment from being added to the current issue.

Of course, you'll need to adjust the configuration to create the issue in the right project and copy the appropriate fields, but you get the idea.

Lakshmi S February 20, 2024

Thank you @David Fischer , I tried using one part of the solution you suggested.

 

The Solution for this is :

 Post function 1 :  Used  script runner post function "Clones an issue, and links" , to create a linked issue in other project based on the field value on the transition screen.

Post function 2 : Added JMWE post function "Comment Issue Post Functions" , to copy the comment field to related issue.

In this 2nd post function, I added "transientVars.comment" to the "Comment Text"

Its working, but adding the comment on both main and linked ticket. 

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2024

Hi Lakshmi,

Yes, this is the correct behaviour - the transition is for the current issue, not the new one you've created, so the comment goes on the issue you are transitioning.

You will need to write another post-function that can take the comment you have just made and adds it to the new issue.

Suggest an answer

Log in or Sign up to answer