When using same-space publishing, how can I make viewers see the released document header only?

Stephen Andary February 11, 2021

I have created a Comala workflow with same-space publishing. However, when the document moves back to draft, the table I display with meta-data using the {pageheader} macro allows viewers to see meta-data in draft states. Is there a way to prevent this? I would like Viewers to see the header of the Published document only, but those working on the draft to see the updated meta-data. 

1 answer

1 accepted

2 votes
Answer accepted
Mike Rink
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 12, 2021

Hi Stephen,

Welcome to the Atlassian Community! I understand that you want to show different versions of metadata depending on if your users are viewing the draft or published versions. 

It is not possible with the pageheader macro and with one variable. However, if there are 2 variables - DraftVariable and PublishedVariable, it is possible to use Draft and Published view in set-message macro.

Once the page is Approved, set-metadata is used to save the ReleasedVariable. In set-message, published view, get-metadata:ReleasedVariable is used and ReleasedVariable is shown.

In set-message, draft view macro, get-metadata:DraftVariable is used and DraftVariable is shown.


Here is an example:

{workflow:name=Simple approval workflow using set message published and draft view|key=com.comalatech.sample.approvals.01|label=message}
{description}
The Simple Approval Workflow has 2 states.
In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
{description}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:statechanged|state=Approved}
{set-metadata:ReleasedVersion}@version@{set-metadata}
{set-message:view=published}
Published view
||Released Version |{get-metadata:ReleasedVersion}|
{set-message}
{trigger}
{trigger:statechanged|state=In Progress}
{set-message:view=draft}
Draft view
||Version |{get-metadata:version}|
{set-message}
{trigger}
{workflow}

If I'm not being quite clear here, we do have some older release notes that might help: https://wiki.comalatech.com/display/CDML/5.2+Release+Notes. 

Hopefully this helps, but feel free to reach out to us at support.comalatech.com if we can do more! 

Stephen Andary February 16, 2021

Thank you Mike! This looks like exactly what I need, if I have trouble with this method I will reach out as you suggested :). 

Stephen Andary February 16, 2021

@Mike Rink Do you know if this message functionality will be built into {pageheader}? It is a good workaround for now, but not optimal as messages have styles. 

Mike Rink
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 16, 2021

@Stephen Andary that functionality is not currently on the roadmap, but I will definitely pass on that feedback to the product team. Best of luck, and let me know if I can help with anything else. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events