Copy Linked Issue Comments to Parent Issue
I would like to copy comments of a linked issue to the parent issue when the linked issue is closed. I was able to accomplish copying the last comment of a linked issue by following the instructions outlined here.
Is it possible to copy over all comments from the linked issue? If so, I would also like to include and preserve information on when the comments were made and whom they were made by if also possible.
Thanks
Weston
Comments (9)
-
repo owner -
reporter Hi Fidel,
Thanks for the response back. This actually accomplishes what I was looking for! Is it possible to include the date/time of the child comments that are copied to the parent issue?
Thanks,
Weston
-
repo owner Sorry @WestonR, but currently is not possible to add date/time information for the comments. I'm including it in the to-do list for future versions of the plugin.
-
reporter No worries, these instructions help greatly! You can go ahead and close this ticket.
-
repo owner - changed status to resolved
Thanks
-
reporter Hi Fidel,
While testing this solution I noticed the following problem. Comments copied from the linked child ticket to the parent ticket don't seem to display the commenters correctly. I created a test ticket, created a linked ticket as the child, then added several comments between my account and a test account. Here were the results I got from this test.
Comments in child ticket:
Comments in parent ticket:
As you can see the comments that are copied to the parent ticket from the child display the wrong name for the commenter. It seems like it's getting hung up when a different user adds a comment to the child ticket.
Here are the screenshots of the post functions I'm using.
Post Function to create child comment:
Complete Post Functions: URL) causing this?
-
reporter - changed status to open
Added problem description in last comment.
-
repo owner Sorry, I used
allCommenters()
mistakenly. The correct function to use isallCommentCreators()
.Use the following string expression:
toString(textOnStringList(allComments(), nthElement(allCommentCreators(), indexOf(^%, allComments())) + ": \n" + ^%), "\n\n")
-
reporter - changed status to resolved
Perfect! This is working now.
Thank you!
- Log in to comment
Hi Weston,
Sorry for the delay in my response. Currently is not possible to copy all the comments as comments to other issue, but you can compose a text with all the comments of an issue and their creators, and copy it to a text field. To do it you have to use the following text expression (in advanced parsing mode):