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.
Hi @Lakshmi CH
you can use a JMWE Create Issue(s) post-function with this configuration:
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.