We have a Confluence User Macro which presents information about a page and its descendants in a table. The attributes for each page are inserted into cells in a row of the HTML table as Confluence macros e.g.,
<td> $page.version <\td>
<td> $page.lastModifier.name </td>
I want to add a new column containing the Comala Workflow status of the page (as both icon and text) eg.:
This way I can easily see if the parent page and descendants are all Published. I cannot figure out how to get at the Comala pagestatus information from the Confluence user macro. The Document Report macro isn't what I want. I just want to add the page status to the existing table .
Does anyone have any suggestions for how to insert a page's Comala workflow status into the table cell?
Thanks in advance.
Followup: I contacted the folks at Comala who said they didn't support integration of Comala Document Management with user macros. They did however suggest I look at the following:
Using a CQL filter in the document-state-report macro to report on grandchildren of a page
I found that I could use the document-state-report macro and use a CQL filter of
ancestor=pageid OR id=pageid
to include the root (index) page as well as descendant pages.
However there were a few issues still remaining:
Hopefully this is useful to others.
Best regards,
--JWM
Hello @John W. Machar , yes this type of thing can often be challenging. First, that object has to be exposed in the Velocity context (many are not) and then second, you have to figure correct reference.
So first, I will share something that has worked with Scroll (K15t) products:
## ContentPropertyManager setup
#set ($containerManagerClass=$content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set ($getInstanceMethod=$containerManagerClass.getDeclaredMethod('getInstance',null))
#set ($containerManager=$getInstanceMethod.invoke(null,null))
#set ($containerContext=$containerManager.containerContext)
#set ($contentPropertyManager=$containerContext.getComponent('contentPropertyManager'))....
#set($fileName=$contentPropertyManager.getTextProperty($content, "metadata.scroll.pagetitle"))
So something like:
#set($pageStatu$contentPropertyManager.getTextProperty($content, "
metadata.properties.comalaworkflows.currentState
"))
Or
#set($pageStatu$contentPropertyManager.getTextProperty($content, "
metadata.comalaworkflows.currentState
"))
You can try to play with this. The Comala people are pretty friendly, so you may want to file a case with them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW, you say you are on Confluence Cloud, but user macros are not available on the cloud. I assume that is in error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill, thanks for the reply. I will try this out. I was hoping there was some simple thing I hadn't managed to discover.
We are using the server edition but I couldn't select that when creating the request. I figured that the user macro information would be the same in each case so just went with one of the allowed options.
Best regards,
--JWM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.