Hi we have a user macro named "UPDATE HISTROY". This has been hadr coded for only particular space only. So i need guidance in this script so that it will be used for all spaces in confluence. Do kindly let me know if any body can help with this. Thanks in advance. Here is the script what i have
## @noparams
#set ( $descendantPages = $pageManager.getPage("NTGSDHSI","Project Status").getChildren() )
#set ( $compareDate = $action.dateFormatter.getCalendar() )
$compareDate.setTime($content.getCurrentDate())
$compareDate.add(6, -7)
<table>
<tr>
<th>Status Page</th>
<th>Last Modified By</th>
<th>Last Modified Date</th>
<th>Modified in last seven days?</th>
</tr>
#foreach ( $page in $descendantPages )
<tr>
<td><a href="$
{req.contextPath}
$childPage.urlPath"> $page.title </a></td>
<td> $page.lastModifier.name </td>
<td> $action.dateFormatter.format($page.lastModificationDate) </td>
<td>
#set ($pageDate = $action.dateFormatter.getCalendar())
$pageDate.setTime($page.getLastModificationDate())
#if ( $pageDate.before($compareDate) )
<span class="aui-lozenge aui-lozenge-error">NO</span>
#else
<span class="aui-lozenge aui-lozenge-success">YES</span>
#end
</td>
</tr>
#end
</table>