Variable for "Page Title" in Properties Report filter?

Scott Beeson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2018

I have a Page Properties Report on a page called "Test Page 1".  It has a filter for "Including Text" and I have typed in "Test Page 1".  Basically, this lists all pages that reference this page, as well as defined properties.

My question is, can I reference the page name via some sort of variable so I don't have to change this for every page?

Basically, something like this:

 

2018-09-26 15_51_57-Window.png

Is this possible?

1 answer

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

Well this variable and method is available, but not clear it will work in the macro as a field: $content.getTitle()

I am not exactly clear what you want to do, but take a look at the docs on the CQL field/filter. It does allow references to ancestors and parents.

page-properties-report-macro

Scott Beeson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

Unfortunately, that does not work.  As far as "what I want to do", not sure how to be more clear.  Here are two screenshots that might help.  I would like to have the same results with both, but as you can see I do not:

 

2018-09-27 10_07_41-Edit - Streaming System - Confluence.png2018-09-27 10_08_18-Edit - Streaming System - Confluence.png

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

Well I am not sure what you mean by

    Basically, this lists all pages that reference this page, as well as defined properties.

References how? Links to it?

Did you try adding a filter and using the CQL filter using With title? Or can you filter looking only at child pages (With ancestor), or via page labels?

 

This may also be a case where a user macro wrapper is what you want to do. Basically create a user macro that retrieves $content.getTitle(), inserting it as a parameter in the report macro. This is a trick I use often to pass special settings OR restrict options for users.

Scott Beeson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

Screenshot 1 shows what I'm doing right now.  I'm putting the page title in the "Including Text" filter.  It does exactly what I want.  "Streaming System" is the title of the page.  Any pages that mention the "Streaming System" will then show up in the table. This is what I want. This is working.

The problem is that when I go to make this a template, I'll have to change that field every time. I'd rather access the title dynamically via a variable.

With Title and With Ancestor filters will not help.

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

Yeah, look at my edit. A user macro wrapper is what you want.

Scott Beeson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

I use cloud, so I assume that's not an option... :(

 

Thanks for your time anyway.

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2018

Ah! Yet another reason to not use cloud. ;-)

BUT I had another thought, if you have access to server Confluence, you can develop and test your user macro, THEN package it as a plugin. Maybe that is a workaround? You would need to confirm with Atlassian support. But to prevent that method, they would have to deny one module type in a plugin.

To get you pointed in the right direction

https://developer.atlassian.com/server/confluence/user-macro-module/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events