I'm in the process of archiving pages in a space and am running a date search to find pages that were created between certain dates. For example:
What I would also like to do is run a similar search on a page and all its child pages to find which was the most recently edited.
Is this possible?
In an ideal world, I'd like to be able to find out when each child page was last edited.
At the moment the only way I can see of doing either of these things is by looking manually, which is far too inefficient and tedious given the 1000s of pages I have to check.
Yes, I wasn't clear there was I? :) I mean that in the space there's 1000s of pages, but using my modified search, I'll find a page within a group of related child pages.
Often the head page won't have been edited since it was created, but the others might have been.
So I'm not looking through 1000s in one go, I'm looking at a group that might be ten or twenty strong.
Ok, in that case I would write a User Macro because it sounds like you're going to want to show the your info on many pages (maybe "parent nodes" of small groups of sub pages)?
Lessee, maybe an "illustration" would make this clearer:
In this image, the second "row" (Topics 1, 2, and 3) is where you want to put your macro. Is this about right?
Sorry to keep belaboring the point, but figuring out exactly what you want to do determines the best way to do it. (By best, I mean most performant and easiest...)
If I understand you correctly, you want to ID the last edited page within each "child group" (the Topics 1-3 in the image)? Is that correct?
Are these known pages (do you know the page names or IDs of the pages?), or do you need to sniff them out as well?
Sorry if I'm not being clear, thanks for sticking with me. :)
"If I understand you correctly, you want to ID the last edited page within each "child group" (the Topics 1-3 in the image)? Is that correct?"
Yes, that's right.
They are known to me because they, the pages, come up in the results from my date search.
Sorry, now I'm the one being unclear: are the parent pages known to you? In other words, Topic 1 is a parent page with 10 child pages. You want to find the most recently edited page of the children of Topic 1, correct? How many "Topic 1s" are there? And do you have a list of them somewhere?
Ok, maybe you can try this user macro (put it on all your pages, in a Layout Decorator). You can hide it by wrapping an IF statement around it that checks against a user type (like admin), your username, or some other comparison.
## Macro title: Recently Updated Children ## ## Developed by: Matthew J. Horn ## Date created: 01/16/2014 ## Installed by: ______ ## Description: Lists all children and their timestamps. Similar to "Recently Updated" macro, except it only applies to child pages of the current page. It's a combination of "Recently Updated" and "Children Display". ## @noparams #set ($pageListArray = ) #set ($rootPage = $content) #macro ( process $rp ) ## note: Not sure what diff is between getChildren() and getSortedChildren() -- "sort" is not by timestamp #set ($pagelist = $rp.getSortedChildren() ) ## returns List<Page> #foreach( $child in $pagelist ) #set($p = $pageListArray.add( $child ) ) #if( $child.hasChildren() ) #process ( $child ) #end #end #end #process ( $rootPage ) <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh">Title</th> <th class="confluenceTh">Version</th> <th class="confluenceTh">Mod Date</th> <th class="confluenceTh">Modifier</th> </tr> #foreach( $child in $pageListArray) ## child is of type Page <tr> <td class="confluenceTd">$child.getTitle()</td> <td class="confluenceTd">$child.getVersion()</td> <td class="confluenceTd">$child.getLastModificationDate()</td> <td class="confluenceTd">$child.getLastModifierName()</td> </tr> #end </tbody> </table>
Let me know if this does what you want. It sounds like you want to integrate this with a date range search, but I haven't quite gotten my head around how to do that yet.
You should automatically generate this report with the Archiving Plugin.
This plugin displays a so-called Content Quality report which will calculate and list the pages not updated in the recent N days. The age of the page is calculated recursively (propagating upwards), this is what you originally asked for, if I'm not mistaken. See a sample report below.
Even better, the plugin will also help you to archive the pages that are not updated and/or not viewed.
And it features a fully automated "set it up and forget it" approach, which scales nicely to thousands of pages.
Hi Community! 2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...
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!
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