Hello,
It seems that I can now use the expand macro in JIRA description (which is great). I would like to use this for automation scripts that I do and create several tickets. Nevertheless, I can't find a way to do it with the API.
I tried using the same macro as in Confluence : {expand}.
If you have a tip on how to make it work that would be appreciated!
Thanks!
Hi, @Nico Mourad. Welcome to the Atlassian Community.
In Jira, you need to look at the Jira REST API documentation. You can also run a GET on your browser, which allows you to see the syntax to check the schema for that macro—assuming the ticket has a macro in the description or comment, for example. If you don't know that already, I'll leave a few links to help you explore that in more detail.
https://YOUR_SITE.atlassian.net/rest/api/3/issue/<ISSUE_KEY>
You can also use the document viewer to test the UI representation of your content body.
https://developer.atlassian.com/cloud/jira/platform/apis/document/viewer/
(Untested) You could try something like in your REST API bodyData:
{"version":1,"type":"doc","content":[{"type":"expand","attrs":{"title":"Please, click here to expand"},"content":[{"type":"paragraph","content":[{"type":"text","text":"Expand example"}]}]}]}
Cheers,
IL.
Thanks for the answer, I already tried to get the issue to see what's stored on JIRA side, but nothing seems specific for that (it actually used the same syntax as lists), which makes me think JIRA stored additional metadata for this expand panel in order to render it.
Like it's mentioned here : https://community.atlassian.com/t5/Jira-Software-questions/Macros-in-Jira-Automation/qaq-p/2079841
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.