Is Confluence's Jira Issues Macro with wiki markup broken forever? Edited

I have successfully been using jenkins to automatically create confluence wiki pages and updating the content using wiki markup.

I specifically use the Jira Issues macro inside a "Wiki Markup" block (which I cannot remember how I created!)

Inside the Wiki Markup block is 

{jiraissues:url=https://jira.myCompany.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+MYPROJECT+AND+issuetype+%3D+%22Defect%22+AND+resolution+%3D+Fixed+AND+fixVersion+%3D+%223.5.0.86%22}

This has been working and jenkins can alter the final string - the fixVersion for each new page created as a result on a new jenkins build.

Suddenly this has stopped working and I am seeing very strange behaviour.

Everything works fine if I just press Preview but if I Update (save) the page, then I get corrupted macros.

If I create 2 wiki markup blocks, identical apart from one searches for issuetype of "Defect" and the other searches for "Story".

Then when I save the page, both Jira Gadget links point to the same link, eg: Story.

Why might the Preview work OK as it always has but the saved page is broken?

See https://confluence.atlassian.com/conf53/confluence-wiki-markup-for-macros-411108835.html#ConfluenceWikiMarkupforMacros-JIRAIssuesmacro

I compared the page source for the preview against the saved page and the interesting difference is the preview contains a unmigrated-wiki-markup tag.

I have just read

Note: You cannot edit content in wiki markup. Confluence does not store page content in wiki markup. Although you can enter wiki markup into the editor, Confluence will convert it to the rich text editor format immediately. You will not be able to edit the wiki markup after initial entry.

But how can I use the "Confluence Wiki Markup for Macros" if it isn't stored?

If I can no longer achieve this, how else can a wiki page be automatically created with an editable (by jenkins) Jira Issues macro gadget?

This thread sounds similar...

https://community.atlassian.com/t5/Confluence-questions/Confluence-When-we-are-trying-to-insert-a-JIRA-query-using/qaq-p/341680

particularly this comment :-

Sam Hall COMMUNITY CHAMPION Jan 05, 2017

Ah. I just tried a basic test and got the same problem. Looks like a bug on Confluence when entering more than one JIRA issue filter using wiki-markup in that way.

 

**UPDATE**

There is definately a bug with multiple jiraissues on a single page.
When I use 'Excerpt' and 'Excerpt Includes' it works and I can get both Stories and Defects shown on the same page.

 

1 answer

This widget could not be displayed.

I have removed the wiki markup and reverted to the actual jira macro.

The only fiddly bit is the macro expects a real value for fixVersion whereas I want to use a BUILD_STR placeholder.

So I create a wiki page with the jira macro and a valid fixVersion which allows me to insert the macro onto the page.

Then I to use the REST API to get the page's storage body into a text file.

I then replace the real fixVersion value with my BUILD_STR placeholder in the text file and update the wiki page using the REST API and the text file.

Bit convoluted but it works and I now have both defects and stories showing in the same wiki page. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

343 views 2 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you