Want to display page information like Creator, Created Date, Last Modified, Approvers, Recent Ver.

Deleted user February 27, 2018

I have a requirement to control documentation based on an ISO standard. I would like to modify our control workflow and "think" it can be done if we set page properties on each page. I would like each of our pages to display the following information on the page itself.  I think I would do this with page properties, but I want the page properties to automatically pull variable data based on the history of the page itself.  Any ideas? It looks like Change History and Contributors macros gives me some of what I want.

I'm looking to add a document control matrix at the bottom of each page that includes:

- Document ID (auto-generated option?)

- Document Title

- Creator

- Created Date 

- Most Recent Revision Number

- Current Page Status (e.g. Approved, Review, etc.)

- Last Approved Date

- Last Approved Revision Number

- Approvers

3 answers

2 votes
Nicolas Casel
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.
February 14, 2023

This is possible to display this 'page metadata' by using this 'User Macro' (i.e. : User Macros can only be created via 'User Macros' feature in Confluence backend):

 

## Macro title: Page metadata

## Macro has a body: N

## Developed by: ...

## Date created: 28/02/2017

## @param Show:title=Display|type=enum|enumValues=Creator,Creation Date,Page Version,Last Modified By,Last Modified Date|required=true|desc=What to display?

## @param Date:title=Date format|type=string|default=yyyy-MM-dd|desc=Enter the format of the date. Use yyyy-MM-dd to be able to sort by date. <a target="_blank" href="https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">More information</a>

#if ($paramShow=="Creator")

#usernameLink($content.getCreatorName())

#elseif ($paramShow=="Creation Date")
$action.dateFormatter.formatGivenString("$paramDate", $content.getCreationDate())

#elseif ($paramShow=="Page Version")
$content.getVersion()

#elseif ($paramShow=="Last Modified By")

#usernameLink($content.getLastModifierName())

#elseif ($paramShow=="Last Modified Date")
$action.dateFormatter.formatGivenString("$paramDate",$content.getLastModificationDate())

#end

 

As outcome, you will get:

 

confluence.page.metadata.png

2 votes
Gorka Puente _Appfire_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 6, 2018

Hi @[deleted],

You can use page properties in your page, and then, use those properties in the workflow. You can have a look at this example

 

https://wiki.comalatech.com/display/CW/Product+Requirements+Blueprint

 

As quick summary, you can add page properties, and then use those properties (metadata) within the workflow, or within the page. 

 

Screen Shot 2018-03-06 at 13.55.11.png

If you want to use the page property "QA" within an approval, use the following:

 

 {state:For Review|approved=Approved}
    {approval:Development|user=@QA@}
{state}

To use that very same property within the page, add the get metadata macro to the page. 

Hope this helps!

Regards,

Gorka

2 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2018

Hi Amy,

Natively in Confluence, as you mentioned, we have the The Change-History macro which displays the history of updates made to a page: version number, author, date and comment. Approval is not a feature of Confluence so we don't have a way to display approved date, approvers and approved revision.

Please consider a third party plugin like Comala Workflows to introduce approval processes.

Thanks,

Ann

Deleted user March 1, 2018

Hi Ann, we have Comala, however, the approval history still shows on a different view.  I'm trying to pull the comala workflow info and some of the change history information and have it display on the page itself.  I see a tool called Scriptrunner that may fit the bill, but I don't know if anyone has used it, or may have another way to pull information to the page itself.  

The out of the box macros don't appear that they can be edited too much to display just fields I want.  I would imagine with some filtering or scripting, it could be done to clean the display. Atlassian knowledge base pages here show "Last Modified" at the bottom of the page, I'm looking to do something similar.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2018

It sounds like your requirements will best be met by an add-on or a combination of add-ons. Consequently I am going to move your question to a collection on the forum where we can get the add-on vendors' attention.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events