Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62468

Unable to download JiraUploadAttachment created attachment


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • jira-steps-plugin
    • None
    • Jenkins LTS 2.222.3 on Windows
      jira-steps-plugin 1.6.0
      Jira both on premise trial on linux using docker or atlassian cloud

      I'm unable to download an attachment created using the JiraUploadAttachment pipeline command.

      The Jenkins 2.222.3 I'm using is running on Windows 10 with the jira-steps-plugin 1.6.0 installed.

      Here is a pipeline snippet:

        jiraUploadAttachment idOrKey: 'NP-56', file: 'SRReport.zip', site: 'trial'
        echo attachment.data.toString()

      Both the issue and the attachment are successfully created, as it is visible on the Job output:

      id:10115, key:NP-56, self:[http://jira.xxxx.net/rest/api/2/issue/10115 [Pipeline] jiraUploadAttachment JIRA: Site - test - Attaching file: D:\Jenkins\jobs\My Pipeline\workspace\SRReport.zip to NP-56 Successful. Code: 200

      I can see the attachment opening the Jira task, but the link is using the full path and it is not downloadable, getting an error 400

      Message Invalid URI

      Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

      I was not able to find how to change the uploaded file name to not contain the full path


            bpelaia Bruno Pelaia
            bpelaia Bruno Pelaia
            0 Vote for this issue
            3 Start watching this issue