Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy specific comment to Linked Service Desk Issue

Ifteqar Ahmed July 20, 2019

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 ?.

 

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 22, 2019

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:

Screen Shot 2019-07-22 at 11.56.56.png

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.

Suggest an answer

Log in or Sign up to answer