Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Surekha Gupta
Contributor
February 5, 2014

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

0 votes
Kathryn Moye
Contributor
February 6, 2014

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.

0 votes
Surekha Gupta
Contributor
February 6, 2014

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?

0 votes
Kathryn Moye
Contributor
February 5, 2014

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>

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events