Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-2308

Copy Comments checkbox in a post function not working properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 5.0.11
    • 5.0.14
    • Workflow Functions
    • None
    • Sprint 31 - Ends July 11, Sprint 31 - Ends July 25
    • 0.4

    Description

      Problem

      When you click the copy comments checkbox and save the post function the checkbox does not stay checked.

      Workaround

      Use the script below in the additional actions field to copy comments from the original issue to the new one.

      import com.atlassian.jira.component.ComponentAccessor
      
      def commentManager = ComponentAccessor.commentManager
      
      doAfterCreate = {
      	commentManager.getComments(sourceIssue)?.each { comment ->
          	commentManager.create(issue, comment.authorApplicationUser, comment.body, comment?.groupLevel, comment?.roleLevel?.id, comment.created, false)
      	}
      }
      

      Attachments

        Activity

          People

            tbatagiannis Thanos Batagiannis
            tbatagiannis Thanos Batagiannis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: