Nested report-info macro injection does not work in Confluence 4

Hi,

we're trying to use a Confluence 3 template in Confluence 4. But it seems, that the report-info macro get messed from the XML converting process. Because it is a live-template, all pages created with this template are broken. Could you please help to solve the problem?

We're using the following code snippet in the template. As you see, we use two report-info macros to generate a link, one for the link name and one for the url. Some characters are being changed during the templating process.

{report-list}
  {local-reporter:data:Changesets}
    {text-sort:ChangesetNumber}
  {local-reporter}

  {report-body}
    [{report-info:ChangesetNumber} |http://as-tfs:8080/tfs/web/UI/Pages/Scc/ViewChangeset.aspx?changeset={report-info:ChangesetNumber}&pguid=c6ccccde-9e45-4372-ba61-859e2223d322] {report-info:ChangesetComment}
  {report-body}

  {report-empty}
    Please {link-to:page edit}edit{link-to} to add changesets.
  {report-empty}
{report-list}

When creating a page using this template, I get the following code mess:

And this is the same part in the source code view:

Any ideas? Thanks for your support!

1 answer

1 accepted

It looks to me from your markup that you've not closed your report-info tags. Perhaps this wasn't necessary in 3.x, but in 4 I think it is. Try closing each one, but for a simpler approach I would recommend injecting the values you need into the text. It's more predictable than using report-info I think, in terms of not introducing spaces or line breaks.

No change, same mistake:

{report-body}
    [{report-info:ChangesetNumber}{report-info}|http://as-tfs:8080/tfs/web/UI/Pages/Scc/ViewChangeset.aspx?changeset={report-info:ChangesetNumber}{report-info}&pguid=c6ccccde-9e45-4372-ba61-859e2223d322] {report-info:ChangesetComment}{report-info}
  {report-body}

CustomWare says, that no closing tag ist needed:

{code}
{report-info:[key=][key chain]|format=[date/number format]|render=[none/wiki]|default=[default value]}

OR

{report-info:[key=][prefix:]value key|format=[date/number format]|render=[none/wiki]}default value{report-info}
{code}

Sorry, but I'm not sure what you mean. What would you recommend, how should I inject the values into the text? The macro generates a list, well, I mean it did.

See this link and the part about keychain injection: http://wiki.customware.net/repository/display/AtlassianPlugins/report-block

"This uses injection to put data into places the report-info macro can't go, such as inside link markup..."

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

172 views 0 4
Read article

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