Forums

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

Would like a way to view pages which *don't* have a label

Stephen Cooper October 5, 2012

We're starting to use Labels in a big way. We'd like to be able to go back through existing pages and find pages which *lack* labels.

Any way to do this? I tried displaying labels which match -* but * is not a valid label.

2 answers

1 accepted

0 votes
Answer accepted
Jonathan Simonoff
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 5, 2012

I can think of two possible ways to do this:

1) Content by label, specifying all your labels with a "-".

2) Not easy, but better: If you have the beanshell macro, you can write Java in a user macro (or just on a page). You could then get a list of all pages, and go through them to find any without labels. I'm only giving you an outline of this because though I think I could write it, it would take me a while to track down all the pieces.

Stephen Cooper October 9, 2012

I'll have to try the beanshell macro idea. Thanks for that!

1 vote
AndrewA
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, 2012

I wrote the following SQL just now and it gives a list of all pages which do not have a label.

SELECT CONTENTID,TITLE FROM content WHERE (CONTENTID NOT IN (SELECT CONTENTID FROM CONTENT_LABEL) and contenttype="page" and prevver IS NULL);

With this list, we can either lookup each page by name or navigate directly by manipulating the following URL using the contetID (where XXXXX is the contentID)

http://<confluence URL>/pages/viewpage.action?pageId=XXXXXX

Cheers,
Andrew

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events