We understand the requested feature is not available right now.
While cloning a Jira ticket how to copy existing Comments and Request Participants.
Can we use the script runner? If anyone used, please share the steps.
Srinivasan S L
You can use script runner but you have to prepare script, you can use
def issueFactory = ComponentAccessor.getIssueFactory()
def newIssue = issueFactory.cloneIssueWithAllFields(issue)
to clone the issue. Then you have to copy comments.
def commentManager = ComponentAccessor.getCommentManager()
def commentService = ComponentAccessor.getComponent(CommentService) // you have to import com.atlassian.jira.bc.issue.comment.CommentService
def user; // you need to initialize this with user who is creating comment, maybe some service user?
def issueComments = commentManager.getComments(issue)
def commentParametersBuilder = CommentService.CommentParameters.CommentParametersBuilder.builder(it)
def commentParameters = commentParametersBuilder.build()
def validateCreateComment = commentService.validateCommentCreate(user, commentParameters)
commentService.create(user, validateCreateComment, false)
I think request participants should be only copying of custom field, but let's try to copy comments and we will solve custom field later.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events