How do I use variable data obtained using get-data to filter pages from a local reporter

I am new to confluence and have two sets of pages, one set for 'feature status' and another for 'team status', both are children of a program page. A feature is worked on by many teams, and I want to be able to pull a report on all contributing teams in the feature page.

I want to allow the feature lead to type in the name of a team on feature page, and automatically report on the team's status. I have a live template called 'team rollup' and I tried to copy some concepts from other pages, e.g. using 'replace-and-render' but it does not work. Here is what I have:

h4. Feature XFT1{text-data:XFT1|required=true}{text-data} Status
{replace-and-render}
{replace-item:%Param%}{get-data:XFT1}{replace-item}
{replace-body}
{table-plus:border=0|cellspacing=0|cellpadding=10|sortIcon=true|columnTypes=S,S,S,S,S,S,S,S,I|columnAttributes=,,,style="text-align: center"}
{report-table}{local-reporter:content:children|source=IPOS Infrastructure Feature and XFT status}
{text-filter:data:XFT Name|include=.*'%Param%'*.*}
{natural-sort:data:XFT Status Color|order=descending}
{text-sort:content:title}
{local-reporter}
{report-column:title=Status}{report-info:data:XFT Status Color|render=wiki}{report-column}
{report-column:title=Area}{report-info:data:XFT Area}{report-column}
{report-column:title=XFT}{report-info:content:title|link=true}{report-column}
{report-column:title=OPO}{report-info:data:OPO}{report-column}
{report-empty}This is displayed if no results are returned by the reporter.{report-empty}
{report-table}
{table-plus}
{replace-body}
{replace-and-render}

THis bare minimum without having a variable 'param' works though, and pulls up the report of all teams that have 'Infra' keyword.


{table-plus:border=0|cellspacing=0|cellpadding=10|sortIcon=true|columnTypes=S,S,S,S,S,S,S,S,I|columnAttributes=,,,style="text-align: center"}
{report-table}{local-reporter:content:children|source=IPOS Infrastructure Feature and XFT status}
{text-filter:data:XFT Name|include=.*Infra*.*}
{natural-sort:data:XFT Status Color|order=descending}
{text-sort:content:title}
{local-reporter}
{report-column:title=Status}{report-info:data:XFT Status Color|render=wiki}{report-column}
{report-column:title=Area}{report-info:data:XFT Area}{report-column}
{report-column:title=XFT}{report-info:content:title|link=true}{report-column}
{report-column:title=OPO}{report-info:data:OPO}{report-column}
{report-empty}This is displayed if no results are returned by the reporter.{report-empty}
{report-table}
{table-plus}

can someone help me find out how to allow user to input data and then use that data in text-filter within local-reporter?

3 answers

This would be very helpful to me too. Here is my example.

<ac:macro ac:name="list-data">
  <ac:parameter ac:name="blank">false</ac:parameter>
  <ac:parameter ac:name="name">DocNumber1</ac:parameter>
  <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
  <ac:parameter ac:name="separator">custom</ac:parameter>
  <ac:rich-text-body>
    <ac:macro ac:name="report-block">
      <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
      <ac:rich-text-body>
        <ac:macro ac:name="grouping-reporter">
          <ac:parameter ac:name="as">datas</ac:parameter>
          <ac:default-parameter>page:title</ac:default-parameter>
          <ac:rich-text-body>
            <ac:macro ac:name="local-reporter">
              <ac:parameter ac:name="source">OPPIP:Cross Program Products</ac:parameter>
              <ac:default-parameter>page:children</ac:default-parameter>
              <ac:rich-text-body>
                <p>
                  <ac:macro ac:name="text-sort">
                    <ac:default-parameter>page:title</ac:default-parameter>
                  </ac:macro>
                </p>
              </ac:rich-text-body>
            </ac:macro>
          </ac:rich-text-body>
        </ac:macro>
        <ac:macro ac:name="report-body">
          <ac:parameter ac:name="injected">true</ac:parameter>
          <ac:rich-text-body>
            <ac:macro ac:name="list-option">
              <ac:parameter ac:name="value">%grouped:datas%</ac:parameter>
              <ac:rich-text-body> </ac:rich-text-body>
            </ac:macro>
          </ac:rich-text-body>
        </ac:macro>
      </ac:rich-text-body>
    </ac:macro>
  </ac:rich-text-body>
</ac:macro>
<ac:macro ac:name="report-block">
  <ac:parameter ac:name="injected">true</ac:parameter>
  <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
  <ac:rich-text-body>
    <ac:macro ac:name="local-reporter">
      <ac:parameter ac:name="source">OPPIP:Cross Program Products</ac:parameter>
      <ac:default-parameter>page:children</ac:default-parameter>
      <ac:rich-text-body>
        <p>
          <ac:macro ac:name="text-filter">
            <ac:parameter ac:name="value">DocNumber1</ac:parameter>
            <ac:default-parameter>page:title</ac:default-parameter>
          </ac:macro>
        </p>
      </ac:rich-text-body>
    </ac:macro>
    <ac:macro ac:name="report-body">
      <ac:parameter ac:name="injected">true</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:macro ac:name="report-info">
            <ac:default-parameter>data:APS</ac:default-parameter>
          </ac:macro>
        </p>
        <p> </p>
      </ac:rich-text-body>
    </ac:macro>
    <ac:macro ac:name="report-empty">
      <ac:rich-text-body>
        <p>Not Found</p>
      </ac:rich-text-body>
    </ac:macro>
  </ac:rich-text-body>
</ac:macro>

I see conflicting information about whether or not text-filter macro can take injected parameter in various user forums. Can someone confirm whether it can? I am using altassian confluence 2.10.3 and I do not know what version of reporting plugin I am using or how to find this version. Do I need to upgrade my plugin?

We have had word from atlassian that if you are using injection when it calls for a regular expression: such as .*%variable%.*, it will not work.

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
Posted Thursday in Off-topic

Friday Fun: Magic Eyes

...staring into the background. Once the image pops out in 3D, you can look around the picture and enjoy. If you will see if you are a true illusion master! :) You did it? :) Wow! Awesome! As a bonus...

449 views 83 11
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