Hi - i am trying to build a report in Confluence using the Reporting plugin that lists the titles of all pages having the label "somelabel". A Scaffolding field on the report page called <my_label> is populated with the value "somelabel". [I'm simplifying things a bit here.] I want to somehow "inject" the value contained in the <my_label> Scaffolding field into the Labels parameter of the Content Reporter of my report so that it retrieves the pages that carry this label. I can't figure out how to do it. Please help.
Hi Martin,
Label parameter is not injectable in Reporting, but you can raise a feature request through our portal:
As a workaround, you can use text supplier (match) to do the comparison with the Scaffolding field.
To make it easier you can import to the following Storage Format:
<p class="auto-cursor-target">Text Data:</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="70b38a6c-6d60-4dd9-92b0-3535008f94f2" ac:name="text-data" ac:schema-version="1">
<ac:parameter ac:name="name">somelabel</ac:parameter>
<ac:parameter ac:name="content">text</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="2c31b2be-60a6-4869-b6dd-5c96d840b4c0" ac:name="report-table" ac:schema-version="1">
<ac:parameter ac:name="displayTitles">false</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="4b8152a9-a962-4e07-99b1-157c947c84f4" ac:name="local-reporter" ac:schema-version="1">
<ac:parameter ac:name="">@self</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="f0393b79-bd7f-4787-b72a-dc69c1c2da92" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="rowSpan">0</ac:parameter>
<ac:parameter ac:name="colSpan">0</ac:parameter>
<ac:parameter ac:name="title">Test 2</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="452937c9-4f70-46cd-ace2-0e7154028250" ac:name="report-variable" ac:schema-version="1">
<ac:parameter ac:name="name">X</ac:parameter>
<ac:parameter ac:name="value">%data:somelabel%</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="8dcefbd3-9af5-4469-afce-e3af4335942f" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="injected">true</ac:parameter>
<ac:parameter ac:name="title">test</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="aeb5931a-d07c-48e4-907f-fd68b529d61d" ac:name="report-table" ac:schema-version="1">
<ac:parameter ac:name="injected">true</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="3a6e977e-ee94-44bf-8976-ebe76eea5794" ac:name="content-reporter" ac:schema-version="1">
<ac:parameter ac:name="types">page</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="36a02a6b-82a0-475f-ac1c-8c409436fa0b" ac:name="text-filter" ac:schema-version="1">
<ac:parameter ac:name="minLength">1</ac:parameter>
<ac:parameter ac:name="">page:labels>join with ",">match %variable:X%>value</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="4e56e492-9a8f-42ab-9b97-609beff6a3b3" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="injected">true</ac:parameter>
<ac:parameter ac:name="title">Title</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="27148ccd-4dba-4324-922a-e8fc75cd3b95" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="link">true</ac:parameter>
<ac:parameter ac:name="">page:title</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="b83bb9a7-8512-4e51-8977-a961d87e48bf" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="injected">true</ac:parameter>
<ac:parameter ac:name="title">All Labels</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="c105672e-ae30-41f2-bc05-35ccc50f5210" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="link">true</ac:parameter>
<ac:parameter ac:name="">page:labels>join with ","</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>
<br/>
</p>
<p class="auto-cursor-target">***</p>
To import the above Storage format, follow the steps below:
Install "Confluence Source Editor" add-on
Go to the page you want to import the Storage format
Click on "Edit"
Click on "<>"
Paste the codes to the source editor
Click on "Apply"
Please do let me know how it goes.
Cheers,
Sayed Bares
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.