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

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.14
    • Component/s: Workflow Functions
    • Labels:
      None
    • Sprint:
      Sprint 31 - Ends July 11, Sprint 31 - Ends July 25
    • Critical Points:
      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

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

              Dates

              Created:
              Updated:
              Resolved: