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

REST issue get no longer shows attachments information

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Medium Medium (View bug fix roadmap)
    • None
    • 5.0.1, 6.3.12
    • JIRA 5.0.1
      Centos 6.2
      Tomcat 6.0.32
      Java 1.6.0_24

      behind HTTPD 2.2 to run Https over AJP 1.3.

      Both installation (prod and test) uses all the same settings above except for the JIRA version.

      we have a JAVA application that's using the REST api on JIRA 4.4.3. I'm testing that Java application on JIRA 5.0.1 (on a testing system, same settings, just did an upgrade).

      All is working, but the REST issue get is no longer providing the attachments information:

      the rest get call is https://10.116.147.51/jira/rest/api/latest/issue/156510
      I've tried with a limited account and and admin account, same result.

      According to the API doc in http://docs.atlassian.com/jira/REST/latest/#id162192, this is the correct call and the example shown in the call shows an example of the attachment JSON block.

      There doesn't seem to be another REST call to access this resource. Am I missing anything or is there an actual issue in JIRA 5.0.1 ?

      Resolution

      Check to see if the "Attachment" field was is to "Hide" in the default field configuration. There is more information on that found here

        1. attachment-38102-jira4.4.3.json
          0.5 kB
        2. attachment-38102-jira5.0.1.json
          0.6 kB
        3. issue-137981-fields_attachment.json
          0.2 kB
        4. jira.txt
          0.0 kB
        5. MKTINT-4950-jira4.4.3.json
          6 kB
        6. MKTINT-4950-jira-5.0.1.json
          5 kB

            [JRASERVER-27637] REST issue get no longer shows attachments information

            You can use &fields=*all in the URL, or pass in *all to the set parameter of the java method searchJql.

            Michael Shepherd added a comment - You can use &fields=*all in the URL, or pass in *all to the set parameter of the java method searchJql.

            jannisbaratheon added a comment - - edited

            Another alternative would be to use issue changelog: https://stackoverflow.com/a/34770728/4494577

            jannisbaratheon added a comment - - edited Another alternative would be to use issue changelog: https://stackoverflow.com/a/34770728/4494577

            For JIRA 7.1 and 7.2.7 the given workaround is not correct: the attachment field is not hidden but not returned on a REST call. Please re-open and fix this. JIRA is getting buggier and buggier and no real problems are solved. It's becoming a not-recommended on my list.

            mjammerlaan added a comment - For JIRA 7.1 and 7.2.7 the given workaround is not correct: the attachment field is not hidden but not returned on a REST call. Please re-open and fix this. JIRA is getting buggier and buggier and no real problems are solved. It's becoming a not-recommended on my list.

            I'm hitting this bug too.  Please re-open

             

            Phil Rittenhouse added a comment - I'm hitting this bug too.  Please re-open  

            The issue is still relevant. A UI setting don't affect data accessible via REST API. This causes the add-ons that use attachments to fail, and confuses the users.

            Dmitry [Lucidchart] added a comment - The issue is still relevant. A UI setting don't affect data accessible via REST API. This causes the add-ons that use attachments to fail, and confuses the users.

            Dieter Freismuth added a comment - - edited

            Had the same Issue within JIRA 7.1.4, but Attachments were never hidden within field configuration.
            Re-adding the 'Attachment' to screen did not solve the issue. The strange thing is that reindex brought back the attachments to the REST call (rest/api/latest/issue/XXX-123?expand=all)
            Afterwards the issue was no longer reproducible, meaning that removing 'Attachment' from screen (note they are still present within the UI!) did not remove the attachments from the REST call.
            NOTE: the attachment response did not contain the empty attachment section ("attachment":[]) but did simply contain nothing about attachment (the word "attachment" was not part of the result)!

            Dieter Freismuth added a comment - - edited Had the same Issue within JIRA 7.1.4, but Attachments were never hidden within field configuration. Re-adding the 'Attachment' to screen did not solve the issue. The strange thing is that reindex brought back the attachments to the REST call (rest/api/latest/issue/XXX-123?expand=all) Afterwards the issue was no longer reproducible, meaning that removing 'Attachment' from screen (note they are still present within the UI!) did not remove the attachments from the REST call. NOTE: the attachment response did not contain the empty attachment section ("attachment":[]) but did simply contain nothing about attachment (the word "attachment" was not part of the result)!

            Please remove the RESOLVED status from this issue. While there is a workaround (suggested in the description), this is a legit but in the REST API that should be fixed.

            Dmitry [Lucidchart] added a comment - Please remove the RESOLVED status from this issue. While there is a workaround (suggested in the description), this is a legit but in the REST API that should be fixed.

            issues.apache.org/jira is one of the most important Jira deployments in the world and it is affected by this bug. Please reopen and fix this issue.

            Alexey Alexey added a comment - issues.apache.org/jira is one of the most important Jira deployments in the world and it is affected by this bug. Please reopen and fix this issue.

            This bug is still present in JIRA 7! Please consider fixing, as this leave Connect Add-ons no way of retrieving issue attachments if the field is "hidden" in the UI

            Dmitry [Lucidchart] added a comment - This bug is still present in JIRA 7! Please consider fixing, as this leave Connect Add-ons no way of retrieving issue attachments if the field is "hidden" in the UI

            The "Resolution" above is not a resolution but a workaround for this bug. A proper resolution is for Atlassian to fix this bug so that attachments are always listed in the JSON. There is no way a GUI setting should affect the REST API JSON output - that's clearly wrong! Please reopen and fix this issue.

            Mark Sheppard added a comment - The "Resolution" above is not a resolution but a workaround for this bug. A proper resolution is for Atlassian to fix this bug so that attachments are always listed in the JSON. There is no way a GUI setting should affect the REST API JSON output - that's clearly wrong! Please reopen and fix this issue.

              mquail Matt Quail (Inactive)
              f4a8a46ac6e3 Johan Fischer
              Affected customers:
              0 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: