-
Type:
Bug
-
Resolution: Not a bug
-
Priority:
Low
-
None
-
Affects Version/s: 9.2.13
-
Component/s: Integrations - Jira
-
None
-
1
-
Severity 3 - Minor
-
1
Issue Summary
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.
In Confluence Data Center, the Jira Issues macro cache is never refreshed if the Confluence page is reloaded within the cache TTL. As a result, stale Jira data is displayed to users, even after they refresh the Confluence page multiple times during that period. After the cache TTL has expired, if the user refreshes the page, the Jira Issues macro then shows the latest values from Jira.
This behavior prevents Jira issue values from being updated in Confluence before the Jira Issues macro cache TTL has elapsed. Even if the customer has a high TTL value may impact a lot, as for the latest results, they need to refresh the JIM itself or wait for the TTL value to expire.
This issue is only observed when the Jira Issues macro is configured with the “Table” display option for multiple issues. For a single-issue display, the cache behavior does not appear to cause a problem.
Steps to Reproduce
- Configure a Confluence Data Center instance.
- Set up an application link from Confluence to Jira.
- Create a Confluence page and insert a Jira Issues macro that queries a Jira project (using the “Table” option for multiple issues).
- In Jira, modify an attribute/field of one of the issues returned by that macro.
- Within 5 minutes (the default Jira Issues macro cache TTL, configurable at <base_url>/admin/jim/cachesettings.action), reload the Confluence page in the browser.
Observed behavior:
- The issue details in the Jira Issues macro remain unchanged, even though the underlying Jira issue was updated.
- The data only updates when the Refresh button at the bottom of the Jira Issues macro is clicked, or when the cache TTL has fully expired.
Expected Results
Confluence should invalidate the cached Jira Issues macro data and refresh it from Jira when the Confluence page is refreshed, even if the refresh occurs within the cache TTL period.
Actual Results
The Jira Issues macro cache is not refreshed on page reload within the cache TTL period, and stale data continues to be displayed. The data is only updated when:
- The Refresh button in the Jira Issues macro is manually clicked, or
- The cache TTL expires and the page is then refreshed.
Workaround
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:
<p> <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> </ac:structured-macro> </p>
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.