Page properties report macro and child page numbers

joshdanhall October 14, 2014

Is it possible to include the child page number in the Page Properties report, so that we can sort by that field?

pagenum.png

6 answers

2 votes
Davin Studer
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.
October 16, 2014

If you had the SQL for Confluence and Run Self-Service Reports for Confluence add-ons this is what I would suggest. Without those I'm not sure how you would do it outside of creating your own add-on to output the page's order in the tree. I was not able to find a way to do it with a user maco ... that doesn't mean it can't be done. If anyone with some velocity chops knows how to get the page order with velocity feel free to call me wrong. Anyway, I'll post this for anyone else who does happen to have those add-ons that might want to do this.

image2014-10-16 9:24:43.png

Here is the SQL so that it can be cut and paste. It is indeed all necessary. I know it looks like you should just be able to query and get the CHILD_POSITION where the CONTENTID = '$page_id' but that only works if the pages have been manually ordered. If they are in default (alphabetic) order then the CHILD_POSITION column is actually NULL. Hence, the need to create the temp table with the identity column to auto number the rows.

declare @tempTable table (
	POSITION  int identity(0, 1),
	CONTENTID numeric(19, 0)
)

insert into @tempTable (CONTENTID)                
select CONTENTID
from CONTENT
where PARENTID in (
	select PARENTID
	from CONTENT
	where CONTENTID = '$page_id'
)
order by CHILD_POSITION, TITLE

select POSITION + 1
from @tempTable
where CONTENTID = '$page_id'
0 votes
joshdanhall October 15, 2014

Steven, updated with screen shot of requirement showing page# column. David, I don't have those plugins.

0 votes
Davin Studer
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.
October 15, 2014

Do you happen to have both the sql and run plugins? If so then I have a solution that I have tested.

0 votes
Steven F Behnke
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.
October 15, 2014

could you mock something up and attach it as an image to your Question? I can't visualize what you want...

0 votes
joshdanhall October 15, 2014

I have structured it so that the report page is the 'parent' and the pages with the Page Properties are 'children' of that page. So it would be nice if the page number (i.e. their relative order) could be included in the parent report.

0 votes
Davin Studer
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.
October 15, 2014

What do you mean by the child page number?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events