<ac:structured-macro ac:name='jira'>
I used above jira macro in confluence page before, but now we upgraded to cloud confluence/jira and the jira macro became legacy. Now I want to use jira issues as below in python, but I don't know how to use.
Where can I get the instruction?
Hello @AnnieLiu ,
You can always check the code format of any macro on the page - just add the necessary macro with data and check the ... -> Advanced Details -> View Storage Format.
Looks like it is added as just HTML <a> element with necessary attributes:
<a href="https://x.atlassian.net/issues/?jql=YOUR_JQL_HERE"
data-card-appearance="block"
data-datasource="{"id":"aaaa-dfda-4500-baaa-e49addddd4dd","parameters":{"cloudId":"abc-e1fc-","jql":"project in (\"XXX\") ORDER BY created DESC"},"views":[{"type":"table","properties":{"columns":[{"key":"issuetype"},{"key":"key"},{"key":"summary"},{"key":"assignee"},{"key":"priority"},{"key":"status"},{"key":"updated"}]}}]}">
https://x.atlassian.net/issues/?jql=JQL_HERE
</a>
Hi, Andrii Maliuta
Thanks for your reply.
But sorry I couldn't find 'view storage format' on my confulence page.
So I want to know how should I rewrite my 'data-datasource'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, did not clarify that for Storage Format you need Admin access to the Confluence instance.
You can also check the page body representation using REST API (https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-group-content) with the format of:
https://{YOUR_SITE}.atlassian.net/wiki/rest/api/content/{PAGE_ID}?expand=body.storage
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrii Maliuta sorry for refresh this.
I notice there's hashlike `macro id`. What's this used for? Will a random generated by myself work?
Thanks for advance :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @kchan_d ,
This hash is generated by Confluence automatically and is unique. As I know you can skip adding the ID (or add any other one) when adding macro with code and after next page update Confluence will add it itself, so it should work fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.