What parameter needs to pass in the below code to fetch next review date, owner and description defined under Page properties macro with ID=metadate in tabular form?
import com.atlassian.confluence.pages.Page
import com.atlassian.confluence.pages.PageManager
import com.atlassian.confluence.spaces.Space
import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.sal.api.component.ComponentLocator
import groovy.xml.MarkupBuilder
def spaceManager = ComponentLocator.getComponent(SpaceManager)
def pageManager = ComponentLocator.getComponent(PageManager)
def spaces = spaceManager.allSpaces.findAll {it.isGlobal()}.take(10)
Map<Space, List<Page>> pagesInfo = spaces.collectEntries { space ->
[
(space): pageManager.getPages(space, true).findAll {
it instanceof Page
}.take(3)
]
}
def writer = new StringWriter()
def builder = new MarkupBuilder(writer)
def date = new Date()
builder.table(class: "aui") {
thead {
tr {
th("Space")
th("Page")
th("Author")
th("Next review date")
}
}
tbody {
pagesInfo.each { space, pages ->
if (pages.size() > 0) {
pages.each { page ->
tr {
th() {
b(space.name)
}
td(page.title)
td(page.creator?.name ?: "N/A")
td(page.Date = new Date())
}
}
}
}
}
}
return writer.toString()