Display page version from draft space to published space

Ally Lancaster May 2, 2019

Hey Community!

I am using a user macro to display the confluence version number which is working great.

## @noparams
Issue #$content.version

But I would also like to display the version number of the same page from a difference space. I am using Comala publishing to publish from a draft space to an approved space.

In the draft space I would like to display the approved version page number followed by the draft version page number.

In the draft space it would look like this:

  • Version: 4.11 OR;
  • Approved version: 4 | Draft revision: 11

In the approved space it would look like this:

  • Version: 4

 

Is this possible? Thank you :)

1 answer

0 votes
Goriana Ivanova
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2019

Hi Ally,

You can do that by using Comala Workflows and Comala Publishing.

In the draft space, you need to save the approved version using set-metadata macro where "@version@" is a value reference to the content version.

 

   {trigger:pageapproved|approval=ApprovalName}

        {set-metadata:approvedversion}@version@{set-metadata}

        {publish-page}   

    {trigger}


 

You can display the draft version and the approved version in pageheader macro using get-metadata macro:

   {pageheader:visibility=all}

               Approved version:{get-metadata:approvedversion}| Draft revision:{get-metadata:version}

    {pageheader}

 

To copy the draft approvedversion metadata to the published space, you need to check "Page Properties" checkbox in Publishing Options screen in Space Tools/Publishing Configuration.

Lastly, to show pageheader in the Published space, you need to add the following workflow:




{workflow:name=Published Space Header|hideStates=true}

    {description}

        This is the workflow for the published space to show metadata from the draft space

    {description}

    {state:invisible|final=true}

    {state}

    {pageheader:visibility=all}

        Version: {get-metadata:approvedversion}
       

        {pageactivity}

 

Hope this helps.

Cheers,

Goriana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events