Hi there
Please can you help me, i want to clone all comments in this transition. How to do it? Some custom code? thx
you mean, need to copy the comments from parent to cloned issue then try with this code
CommentManager commentMgr = ComponentAccessor.getCommentManager(); Collection<Comment> comments = commentMgr.getComments(sourceIssue); for (Comment comment : comments) { commentMgr.create(clonnedissue, comment.getAuthor(), comment.getBody(), comment.getGroupLevel(),comment.getRoleLevelId(), comment.getCreated(), false); }
make sure you have updated source and linked issue objects as per requirement
hi
this works with Groovy runner? i am using Script workflow function "Clones an issue and links" and there i can fill Additional issue actions. Please can you help me how to configure parent and cloned issue?
i can see there this option:
issueInputParameters.setComment('Write your comment here')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you have to replce the following objects
1. sourceIssue: it should be current issue object, i think you ca use as issue
2. clonnedissue: it should be clonned issue object, i am not sure how to get this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Peter,
Not sure if you could finally do it? I want to do the same thing but could not find out how to make it work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This one doesn't work, even after I changed 'clonedissue' to 'issue' in the script Rambanam provided below. Error Null pointer assignment somewhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.