Use Jira Rest APIs instead of XML in Jira Macro Extension

Hello,

I installed the Jira Macro extension along with the Jira Administration extension and was able to make it work. I was also able to extend the Jira Administration to use bearer authentication on a per-user basis.

However, I noticed that the Jira Macro is calling the old xml jira APIs

For example: /sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=issueKey+in+%28ISSUE-1%29&tempMax=20

Unfortunately, this endopint does not support Bearer Auth authentication.
My need to is show the Jira Issue information only if the logged in Xwiki user has permission to view the issue in Jira, which requires calling Jira using the user’s token.

Is there a way to make the extension use the new Jira Rest APIs while keeping everything else (rendered macro ui, …etc) the same?

For example: rest/api/latest/issue/ISSUE-1?expand=schema%2Cnames%2Ctransitions

Thanks,

Ray

Hello,

We have some jira macros that user the JIRA REST API (the graph macros for ex) so it shouldn’t be too hard to change that for the main jira macros too. Could you report an issue at Loading... ?

Note that there’s already Loading... which might also require to move to the JIRA REST API (idk if the XML APIs support tokens).

Thx

Hello,

Thank you for your response!

No the XML APIs don’t support tokens as far as I know.

I have opened an issue for this.

Thanks,

Ray

thx!