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

Jira should provide an API for querying data about its gadgets

    XMLWordPrintable

Details

    • 1
    • 3
    • Hide
      Atlassian Update – 19-03-2019

      Hi everyone,

      I would like to clarify the current state of the problem related to Jira's gadgets (e.g. Two-Dimensional Filter Statistics) REST endpoints using request's URL to create a response.

      This issue has been initially raised as a bug. The behaviour which was described as faulty was the fact that some of the REST endpoints related to gadgets use the URL present in request to form a response rather than rely on what is configured as instance's base URL. After the investigation it turned out that the aforementioned endpoints are not part of Jira's public API. They have been designed for internal usage only and their output URLs dependence on their inputs is an expected behaviour.

      We have then decided to treat that bug as a sign that Jira's API is not sufficient for accessing its internal gadgets and track it further as a suggestion to provide plugin developers with such enhancement. 

      In order to understand how high demand for such API is, Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments.

      Thank you,
      Pawel Drygas
      Jira Bugmaster

      Show
      Atlassian Update – 19-03-2019 Hi everyone, I would like to clarify the current state of the problem related to Jira's gadgets (e.g. Two-Dimensional Filter Statistics) REST endpoints using request's URL to create a response. This issue has been initially raised as a bug. The behaviour which was described as faulty was the fact that some of the REST endpoints related to gadgets use the URL present in request to form a response rather than rely on what is configured as instance's base URL. After the investigation it turned out that the aforementioned endpoints are not part of Jira's public API. They have been designed for internal usage only and their output URLs dependence on their inputs is an expected behaviour. We have then decided to treat that bug as a sign that Jira's API is not sufficient for accessing its internal gadgets and track it further as a suggestion to provide plugin developers with such enhancement.  In order to understand how high demand for such API is, Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments. Thank you, Pawel Drygas Jira Bugmaster
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Jira does not provide an API for rendering/querying the state of its internal gadgets. This could be useful for e.g. other products and plugin developers who would like to embed them within their apps. Currently, the only way to obtain info about these gadgets is to use Jira's internal API which hasn't been designed with this use case in mind. This may lead to issues such as https://jira.atlassian.com/browse/CONFSERVER-41311.

       

      Previous bug description
      Title: The Two Dimensional Filter Statistics Gadget REST api renders links using the request URL, rather than the configured base URL
      Steps to Reproduce
      1. Setup JIRA behind a reverse proxy, with an alternative access port
      2. Setup Confluence
      3. Create an application link to localhost:8080/jira
      4. Change JIRA's base URL to the proxied address
      5. In the application link configuration, change JIRA's display URL to the proxied address
        • Communication will go from Confluence to JIRA over the unproxied port, but user facing links will use the display URL for hyperlinks.
      6. Insert a Two Dimensional Macro Chart Macro in Confluence
      Expected Results

      The links in the chart link to the proxied address

      Actual Results

      The links in the chart use the application URL instead. If that port is not accessible to users, this may result in links failing, or if the DNS does not resolve.

      Cause

      This bug is the result of a problem in Jira's gadget REST api (http://hostname:1990/rest/gadget/1.0/twodimensionalfilterstats/generate?filterId=jql-), which incorrectly uses the request url as the base for links in the results, rather than Jira's configured baseUrl.

      This means that any applicationLink requests made to this REST api would have the results rendered using the applicationLink's baseUrl, rather than the configured displayUrl.

      The two dimensional charts macro can't fix this problem. Instead, this bug has to be fixed inside Jira's gadget REST api. Either make the links in the twodimentionalfilterstats rest api a relative link, or use the configured baseUrl as the base for the (absolute) links.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jxie Chii
              Votes:
              30 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

                Created:
                Updated: