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

'Attachments' not available as option for 'Fields to copy"

    XMLWordPrintableJSON

    Details

    • Critical Points:
      0.7

      Description

      'Attachments' is not available as an option for 'Fields to copy' for a clone and link post function. At first, I couldn't reproduce this bug, but then 'Attachments' disappeared as an option and I'm not sure what changed.

      One thing that I did before this occurred is edit the description of 'Attachment' from the Field configurations page, but I'm not sure if that could have actually affected this.

      This is also happening with the create subtask post function.

      Workaround

      Use the additional actions field to clone attachments from one issue to another. The script, to clone all the attachments will be

      import com.atlassian.jira.component.ComponentAccessor
      import com.atlassian.jira.issue.AttachmentManager
      import com.atlassian.jira.issue.MutableIssue
      
      doAfterCreate = {
          def sourceIssue = sourceIssue as MutableIssue
          def issue = issue as MutableIssue
      
          def attachmentManager = ComponentAccessor.getComponent(AttachmentManager)
          attachmentManager.copyAttachments(sourceIssue, issue.creator, issue.key)
      }
      
      

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            twortham Tiffany Wortham
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: