how can I build a report for value = ?

So I have metadata on a page, but I'm trying to figure out how I can build a report against a specific value.

ie if the column is "day", and there are values of friday, friday, friday, thursday, wednesday

how can I build a report for all the rows that have day = friday?

3 answers

1 accepted

This widget could not be displayed.

I'm a little hazy on the exact Supplier that Metadata provides, but you should be able to do something like this:

{report-table}

{local-reporter:page:descendents}

{text-filter:metadata:AB|value=AB}

{text-sort:page:title}

{local-reporter}

{report-column:title=Page}{report-info:page:title|link=true}{report-column}

{report-column:title=Application}{report-info:metadata:Application}{report-column}

{report-column:title=Component}{report-info:metadata:Component}{report-column}

etc...

{report-table}

You can add more filters and sort values inside the {local-reporter} to customise your query. If you use Scaffolding data fields instead, you can specify formatting for date and number fields. Just substitute "data:My Field Name" into the above, and provide a 'format' rule to display them. Eg, for creation date it might be:

{report-info:data:Creation Date|format=d MMMM, yyyy}

Which would output something like "29 September, 2011".

Hope that helps!

Thanks David

I tested that, and it's returning the actual scaffolding data, not the values I put in.

ie when I specify for Application, it's returning this value:

{text-data:Application2|width=600px|height=50px|type=area}WM, WMPB .. etc etc

Any idea how I can get around that?

I would suggest using the actual 'Application2' value then. That is:

{report-info:data:Application2|render=wiki}

That will return the contents of the Scaffold field, rather than the metadata field which contains the Scaffold {text-data} markup.

Great! That's one step closer to getting what I need.

Based on using the data: pre-fix, how should I use the text-filter to filter based on that data?

Can I use something like data:Application2|include=WC where the metadata has WC somewhere in the data? (I want to be able to use include rather than just value=)

Thank you David!

Aha! I think I got it.

{text-filter:data:Application2|include=WC}

That should be sufficient. Thanks David

That would do the trick. If you want it to be a real 'contains WC', then add '.*' before and after. Eg:

{text-filter:data:Application2|include=.*WC.*}

Great! That's definitely a huge help.

One more issue I'm running into.

{list-data:Component3|type=check|multiple=true}
{list-option}Web{list-option}

It's not letting me grab the data if it's a list-option. Is there anything special, aside from :data:, that I have to use to grab those values?

Thanks for all your help David

{list-option} values are accessible as 'Text' objects (via the Text Supplier). However, in this case you have 'multiple=true', which means the result for 'data:Component3' is actually a Collection of Text values, so you need to work with the value as a collection. There are a couple of ways to do this. The simplest is {report-on}, and would look like this:

{report-on:data:Component3|separator=comma}{report-info:@self}{report-on}

Thx!

Everything was working until I tried to use "descendants" .. only to find there was a small bug :)

http://community.customware.net/customware/topics/local_reporter_children_works_but_descendants_doesnt

I switched it to "descendents" and BAM! Everything is working great now.

Thanks for all your help David

This widget could not be displayed.
{text-filter:prefix:key|value="friday"} should do the trick for you.
This widget could not be displayed.

Does depend on how you're storing your metadata (ie. with the Metadata Plugin or the Scaffolding Plugin?) and what you're reporting with. More details of your wiki markup would be helpful...

I'm actually using both.

I'm using live-template to pull in the live template from the scaffolding plugin and inside the live-template, I'm wrapping the fields with metadata

that way each page with the template that I use, has the metadata

Here is an example of the reporting page I have on the metadata

{metadata-report:Page,Application,Component,Create Date,Fix Version,Author,Publisher|root=Test Cases|pages=@descendants}
that pulls in the meta data that I'm using for each page. I'm trying to figure out how I can do something like...
Component = AB

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

101 views 12 6
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