Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-44335

Cannot add attachments when closing issues

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Edit the default Resolve Issue Screen and add Attachment field to it (if it's not there yet)
      2. Make sure the Closed step of a Test workflow has the property jira.issue.editable set to false (default) and all Close Issue transitions use the above Resolve Issue Screen
      3. Open an issue using the above Test workflow for example and make sure it's not Closed yet
      4. Click the Close Issue button to pop up the Resolve Issue Screen, attach a file from that screen, and click Close

      Expected behavior

      The attached file is added to the issue

      Actual behavior

      The attached file is NOT added to the issue and the following warning is seen in the log:

      2015-07-16 14:24:03,189 http-bio-8686-exec-15 WARN admin 864x1899x1 dt381w 192.168.1.100,0:0:0:0:0:0:0:1 /secure/CommentAssignIssue.jspa [jira.issue.fields.AttachmentSystemField] There were errors while converting temporary attachments: AttachmentError{logMessage='An error occurred: You can not create attachments as the issue is in a non-editable workflow state.', localizedMessage='You can not create attachments as the issue is in a non-editable workflow state.', filename='', reason=VALIDATION_FAILED, exception=none()}
      

      The warning sounds logical, but this kind of behavior does not occur in JIRA 6.3.15, in which files can still be attached when closing an issue using exactly the same screen and workflow property.

      Seems that this behavior is introduced in JIRA 6.4.x where issues are Closed before JIRA tries to add the attached files, causing file attachments to fail.

      Workarounds

      1. Workaround 1: Use Attach Files function to attach files before closing an issue
      2. Workaround 2: Update the workflow and remove the workflow property from Closed step
        this also means that issues can be edited after being Closed

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vdung Andy Nguyen (Inactive)
              Votes:
              123 Vote for this issue
              Watchers:
              96 Start watching this issue

              Dates

                Created:
                Updated: