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

JIRA XML API takes a long time to return XML data (search request)

      Summary

      JIRA XML API takes a long time to return XML data (JQL search result).

      There are some integrations (Confluence gadgets ie) that utilize Jira XML API to search and retrieve issues from a filter:

      The same JQL query based on a defined filter:

      • takes around 30 seconds to gather data via XML API
      • takes less than a few seconds via Jira UI.

      Observable slowness is not related to enabled add-ons in Jira. Issue is not related to JQL complexity, however it's connected to custom fields usage in the query.
      The slowness is related to XML API only, not the JQL itself.

      Environment

      Jira > 7.0 versions.

      Steps to Reproduce

      Execute a JQL query that contains any custom field via Jira XML API (searchRequest method):

      Expected Results

      Execution time is equal (or is close) to the execution time of JQL through web UI.

      Actual Results

      Execution time is significantly worse than the same JQL through web UI.

      Notes

      Any integration with Jira XML API is affected (including Atlassian products)

      Workaround

      No workaround found.

            [JRASERVER-67095] JIRA XML API takes a long time to return XML data (search request)

            As mentioned by spera.rafa this bug was resolved on Confluence side, see https://jira.atlassian.com/browse/CONFSERVER-56017. Please upgrade your Confluence version if you are affected by this issue. CC: mostaszewski@atlassian.com

            Przemyslaw Czuj (Inactive) added a comment - As mentioned by spera.rafa this bug was resolved on Confluence side, see https://jira.atlassian.com/browse/CONFSERVER-56017 . Please upgrade your Confluence version if you are affected by this issue. CC: mostaszewski@atlassian.com

            Rafael Pinto Sperafico added a comment - - edited

            Summary

            Steps to reproduce

            1. Create a Project in Jira, e.g (Project name: PROJECT, Project key: PROJ)
            2. Create a CustomField and associate it to a Screen for project just created
            3. Create an issue, giving a value to customField created.
            4. When applicationLink configured and working between Jira and Confluence, add a Jira Gadget to a page in Confluence searching for a single issue in Jira, e.g: issuekey = PROJ-1, selecting some field to be displayed, including your customField.

            Expected result

            Only customField(s) specified in the gadget should be retrieved

            Actual result

            ALL fields/customFields available to PROJ-1 get retrieved, regardless if they are available to View screen.

            Notes

            When enabling org.apache.http.wire to Confluence, we can find the request made to Jira in atlassian-confluence.log, e.g:

            2020-07-01 12:10:37,384 DEBUG [JIM Marshaller:thread-65] [org.apache.http.wire] wire http-outgoing-213475 >> "GET /sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?tempMax=50&returnMax=true&jqlQuery=issuekey%20%3D%20PROJ-1&field=summary&field=created&field=assignee&field=allcustom&field=bar&field=foo&field=status&field=issuelinks HTTP/1.1[\r][\n]"
            

            Even though we are specifying fields/customFields to be displayed in Jira Gadget on a Confluence page, the request to Jira gets appended with field=allcustom, causing the request to fetch all fields/customFields.

            When manually requesting the URL above against Jira, by removing field=allcustom from the HTTP request, unnecessary fields/customFields are not longer retrieved, making the request much more responsive.

            It seems this field=allcustom is coming from com.atlassian.confluence.extra.jira.columns.DefaultJiraIssuesManager#getFieldRestrictedUrl

            Workaround

            Upgrade Confluence to version 7.4.1 (LTS) or 7.5.0+ as mentioned on https://jira.atlassian.com/browse/CONFSERVER-56017 - Regression - JIRA Issues Macro fetching unnecessary fields from JIRA

            Rafael Pinto Sperafico added a comment - - edited Summary JIRA XML API ( https://JIRA_URL/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml ) takes a long time to return XML data (JQL search result) due to ALL customFields being fetched by jqlQuery provided. Steps to reproduce Create a Project in Jira, e.g (Project name: PROJECT, Project key: PROJ) Create a CustomField and associate it to a Screen for project just created Create an issue, giving a value to customField created. When applicationLink configured and working between Jira and Confluence, add a Jira Gadget to a page in Confluence searching for a single issue in Jira, e.g: issuekey = PROJ-1 , selecting some field to be displayed, including your customField. Expected result Only customField(s) specified in the gadget should be retrieved Actual result ALL fields/customFields available to PROJ-1 get retrieved, regardless if they are available to View screen. Notes When enabling org.apache.http.wire to Confluence, we can find the request made to Jira in atlassian-confluence.log , e.g: 2020-07-01 12:10:37,384 DEBUG [JIM Marshaller:thread-65] [org.apache.http.wire] wire http-outgoing-213475 >> "GET /sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?tempMax=50&returnMax= true &jqlQuery=issuekey%20%3D%20PROJ-1&field=summary&field=created&field=assignee&field=allcustom&field=bar&field=foo&field=status&field=issuelinks HTTP/1.1[\r][\n]" Even though we are specifying fields/customFields to be displayed in Jira Gadget on a Confluence page, the request to Jira gets appended with field=allcustom , causing the request to fetch all fields/customFields. When manually requesting the URL above against Jira, by removing field=allcustom from the HTTP request, unnecessary fields/customFields are not longer retrieved, making the request much more responsive. It seems this field=allcustom is coming from com.atlassian.confluence.extra.jira.columns.DefaultJiraIssuesManager#getFieldRestrictedUrl Workaround Upgrade Confluence to version 7.4.1 (LTS) or 7.5.0+ as mentioned on https://jira.atlassian.com/browse/CONFSERVER-56017 - Regression - JIRA Issues Macro fetching unnecessary fields from JIRA

            Fixing bug which is introduced in version which supposed to be named Enterprise Release is not acceptable.

            Enterprise Release should not introduce new bugs.

            It should be stable and as much as possible bug free.

            I will raise this with our TAM once more.

            Whole company changing pages to be able to see data and the are missing valuable data.

            Each time they need to go to Jira view to lookup additional fields when it was possible to do in a past....

            AregVrtanesyan added a comment - Fixing bug which is introduced in version which supposed to be named Enterprise Release is not acceptable. Enterprise Release should not introduce new bugs. It should be stable and as much as possible bug free. I will raise this with our TAM once more. Whole company changing pages to be able to see data and the are missing valuable data. Each time they need to go to Jira view to lookup additional fields when it was possible to do in a past....

            Any update or timeline to fix this issue?  We can consistently reproduce this issue with our systems which is causing issues for Confluence pages with Jira filter macros.  Please get this fixed asap.

            It would be a shame to go through another yearly update with this still being an issue on the new version of Jira.  If there are any tests or further information needed for this, please let me know and i'll be happy to help.  Thanks.

            Adam Barylak added a comment - Any update or timeline to fix this issue?  We can consistently reproduce this issue with our systems which is causing issues for Confluence pages with Jira filter macros.  Please get this fixed asap. It would be a shame to go through another yearly update with this still being an issue on the new version of Jira.  If there are any tests or further information needed for this, please let me know and i'll be happy to help.  Thanks.

              Unassigned Unassigned
              tdudzisz Tomasz Dudzisz (Inactive)
              Affected customers:
              26 This affects my team
              Watchers:
              30 Start watching this issue

                Created:
                Updated:
                Resolved: