Hi,
I have project A (Service Desk) & project B (Software)
I want to copy a particular comment from ticket-B to service desk ticket-A
Is there any way to achieve this ?.
Hello Ifteqar,
Just to confirm we are on the same page, I understood you are looking for an automatic way to copy comments added in a specific ticket to another related/linked ticket in another project, have I understood it correctly?
If that's what you are looking for, JIRA does not have this functionality yet (see the feature request JSDCLOUD-5962), however, you can easily achieve it by using a third-party app.
Here are some options:
1 - Using Automation for JIRA Server, you can create a rule to automatically copy comments to your linked issues:
2- Using Scriptrunner, you can easily create a Custom listener triggered by the event "Issue Commented" and add a script similar to this one.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.issue.AbstractIssueEventListener import com.atlassian.jira.event.issue.IssueEvent; public class CopyComments extends AbstractIssueEventListener { @Override void workflowEvent(IssueEvent event) { def linkedIssue = "PROJECT-1"; def commentManager = ComponentAccessor.getCommentManager(); def issueManager = ComponentAccessor.getIssueManager(); def comment = event.getComment() def targetIssue = issueManager.getIssueObject(linkedIssue); commentManager.create(targetIssue, comment.authorApplicationUser, comment.body, true); } }
Let me know if this information helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.