JIRA issue/filter macro - is there a way to load issues synchronously?

George Ivanov
Contributor
February 16, 2020

It looks that in the newer versions of Confluence (like 7.3.1) JIRA issues are loaded by the browser asynchronously. In some older versions, like in 5.6.3 the macro seems to load the issues synchronously. Is there a way to switch the macro into the synchronous mode for backwards compatibility?

The reason is that we are using a macro that takes the result of JIRA issue macro and process it. However, it is a server-side macro, so it needs the data synchronously.

So, currently I see that in preview mode everything loads and gets processed ok, but in display mode I see no data from JIRA issues / filter (only column names)

From a glance, this appears to be similar to the issue, described here: https://community.atlassian.com/t5/Answers-Developer-Questions/Make-JIRA-Issues-macro-loaded-synchronously/qaq-p/468447

Any ideas would be appreciated

2 answers

0 votes
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2020

Hi George,

The switch to browser-loaded issues was done primarily for performance reasons. It results in a faster pageload for the user accessing the page (as the rest of the page can paint in the browser while the issues are still being returned) and prevents bottlenecks on the application server side so a slow-loading query can't bog the Confluence server down for everyone. Short of holding back on to a particular version of Confluence, there is not a way to force the macro to load synchronously. 

You might have a couple options:

  1. Create a user macro that makes a call to Jira to load issues
  2. Try one of the other issue macros on Marketplace and see if they fetch the issues in a useable way for you:
    1. Issue Macro from Jira to Confluence by Capital City Consultants
    2. Issue Manager for Confluence by //SEIBERT/MEDIA

We also have a dedicated Developer Community that might be good to check out for plugin development related questions. Since the topics are more focused, it's easier for other developers to watch the questions coming in and provide guidance.

Cheers,
Daniel | Atlassian Support

George Ivanov
Contributor
August 24, 2020

Daniel, many thanks for your response!

May I know on which version of Confluence the switch to browser has been done? At least I'll be able to document the compatible versions.

Also, since I see in the preview everything works fine, is there a way for the outer macro to pretend it is always working in the preview mode (or it would be a bad practice)?

Or, there might be a way for the outer macro to process the async part (browser requests) on server side?

Cheers

0 votes
George Ivanov
Contributor
February 18, 2020

let me put it in another way:

1. there is a server-side macro (the outer macro)

2. the outer macro has an inner macro which loads data asynchronously (like JIRA issues/filter)

3. I'd like the outer macro (being processed on server's side Java) to get all the async data from the inner macro

How this could be achieved?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events