Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-60111

Jira issue macro cache never refreshes in Confluence 7.x DC



    • Bug
    • Status: Short Term Backlog (View Workflow)
    • Medium
    • Resolution: Unresolved
    • 7.0.3, 7.2.1, 7.3.1, 7.4.0, 7.5.2, 7.6.0, 7.19.0
    • None
    • Macros - Jira Macros


      Issue Summary

      In order to improve performance, Confluence maintains a cache for the Jira issues macro to prevent each macro view from polling Jira for data. The default TTL for this cache is 5 minutes.

      From Confluence Data Center 7.0 onwards, the Jira issues macro cache is never refreshed automatically, resulting in stale Jira data being presented to users.

      • Confluence DC 6.x is not affected, and no versions of Confluence Server are affected. Only Confluence DC 7.x has this issue.
      • Tested with and Chrome 83.0.4103 and Firefox 72.0.1

      The following configurations were tested With Jira 8.3:

      Confluence Data good or stale
      6.13.9 DC OK
      6.15.8 DC OK
      7.0.3 DC STALE
      7.2.1 DC STALE
      7.3.1 DC STALE
      7.4.0 DC STALE
      7.5.2 DC STALE
      7.6.0 DC STALE
      7.3.1 Server OK
      7.5.0 Server OK
      7.6.1 Server OK

      Steps to Reproduce

      1. Configure Confluence Data Center
      2. Setup application link to Jira
      3. Create page and insert Jira issue macro against a Jira project
      4. Modify an attribute of one of the issues in the Jira project
      5. Wait after 5 mins (default Jira issue macro cache TTL : <base_url>/admin/jim/cachesettings.action) and reload the page in the browser.
      6. Issue details remain the same, until the 'refresh' button at the bottom of the Jira issue macro is clicked.

      Note: Changing the Jira issue macro cache TTL (<base_url>/admin/jim/cachesettings.action) or setting it to zero has no effect. Stale data will still be displayed.

      Expected Results

      Confluence should invalidate the cache data (and refresh the cache from Jira) after the Jira issue macro cache TTL (default 5min) has passed.

      Actual Results

      The cache data is never refreshed and stale data is shown, even on a page refresh/reload.


      • Workaround #1 and #3 below are instant fixes but the problem will return immediately.
      • Workaround #2 presents the most up-to-date Jira data but will incur a performance hit, as every page load will have to contact Jira for the data, however it ensures that the data is not stale.  

      Workaround 1:

      Click the 'refresh' button at the bottom of the Jira issue macro. This relies on the user to perform this action and a new click on 'refresh' will be required every time to update the data.

      Workaround 2:

      Install the 'Confluence Source Editor' from Atlassian Marketplace and when editing the page, click the '<>' icon in the top right to edit the properties of the macro and add the line below (as per Jira Issues Macro):

      <ac:parameter ac:name="cache">off</ac:parameter>

      For example:

        <ac:structured-macro ac:macro-id="575b5737-f201-4953-9a31-57cc48dc29e0" ac:name="jira" ac:schema-version="1">
          <ac:parameter ac:name="server">Jira</ac:parameter>
          <ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter>
          <ac:parameter ac:name="maximumIssues">20</ac:parameter>
          <ac:parameter ac:name="jqlQuery">Project="Star Trek" </ac:parameter>
          <ac:parameter ac:name="serverId">a11fa272-0a98-37e5-86b3-e563cce10260</ac:parameter>
          <ac:parameter ac:name="cache">off</ac:parameter>

      With this workaround, each Jira macro needs to be edited, as the macro parameters are specific to each occurrence of the macro and are not global settings.

      Workaround 3

      Flushing various distributed Jira caches in Confluence (eg. Jira metadata aggregate) via <base-url>/admin/cache/showStatistics.action#fullView will also force the Jira updates to be loaded, but they will then become stale again. This can have other unintended performance impacts and is not recommended as a workaround, merely documented here to capture the behaviour.


        Issue Links



              Unassigned Unassigned
              mninnes@atlassian.com Malcolm Ninnes
              10 Vote for this issue
              19 Start watching this issue