clone issue with comments - possible?

Situation is where an issue gets off topic. I want to clone it and rename, delete out all comments preceding the topic change. How to achieve this?

1
4 comments
Official comment

Hello Ryan, you can create a custom workflow and clone the issue by using `copy()` method, but unfortunately you can't clone comments there. You can copy comments from the parent issue one by one but you can't preserve timestamps and authors of those comments.
Also you'll need to decide when to trigger this workflow - for example, on a change of some custom field.
Please let us know if you have any further questions or if you need assistance.
Thank you.

Good day!
Is it still impossible (I mean easy clone with comments preserving timestamps/authors)?

My use case:
As I couldn't find a way to allow some users only private comments (public comments are sent by email to customers) we are trying to make an internal project where more users can leave comments (which are not sent to customer). So we need to clone parent issue with all comments to internal project.

0

Hi!

I'm Sergey from the YouTrack team.

Is it still impossible (I mean easy clone with comments preserving timestamps/authors)?

As mentioned before, you can copy the content of the comments and add them to a new issue using the addComment() method. Timestamps won't be preserved, though.

As I couldn't find a way to allow some users only private comments

This is also possible since you can check comment's visibility settings in a workflow: permittedGroups, permittedGroup, and permittedUsers properties.

If you are not familiar with how the workflow feature works, please refer to our tutorial.

1

Thanks Sergey!
I've managed to use workflows to copy all comments in a loop preserving author but not timestamp.

0

Please sign in to leave a comment.