Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Comala - Select a specific User/Group for next state with restrictions

Kay June 9, 2021

Hi Guys, here is first the Use Case:

State is Draft - a user or group (A1) has set restrictions for view and edit.

Now the User from A1 want send this state to another (state VIEW).

Before the status changes, the user A1 should be asked who should be added as user/group in the next status.

The new/new user/group A2 must also have restrictions in the next status, because nobody except user/group A1 and A2 should see and edit the document.

How can i do that?

1 answer

1 accepted

1 vote
Answer accepted
Jorge Merino
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.
June 10, 2021

Hi Kay,

You could create a new user type parameter P1 and configure the next state to require it.

This functionality is called required params, you can find more information here.

Then, you could add P1 value to the page edit restrictions. Please find below a markup example about what you are trying to implement:

{workflow:name=Testing required params}
{description}
The Publishing Workflow has four states.
Ready: Edited by Staff. Reviewed: Reviewed by Managers. Published: Approved by Editor-in-Chief & viewable publicly.
You can define the Reviewer and Editor-in-Chief in the Space Admin Workflow Configuration.
{description}
{workflowparameter:Reviewers Group|description=Please add the reviewers group|type=group|edit=true}
confluence-users
{workflowparameter}
{workflowparameter:Reviewers Users|description=Please add the users|type=user|edit=true}
admin
{workflowparameter}
{workflowparameter:Reviewers|description=Please add the users group|type=user|edit=true}
admin
{workflowparameter}
{state:Draft|submit=Ready}
{state}
{state:Ready|approved=Reviewed|rejected=Draft|requiredparams=Reviewers Group,Reviewers Users}
{approval:Review|assignable=true}
{state}
{state:Reviewed|approved=Published|rejected=Ready}
{approval:Final approval|final=true|assignable=true}
{state}
{state:Published|final=true|rejected=Reviewed|updated=Ready|hideselection=true}
{state}
{trigger:statechanged|state=Ready}
{add-restriction:type=view|group=@Reviewers Group@|user=@Reviewers Users@}
{add-restriction:type=edit|group=@Reviewers Group@|user=@Reviewers Users@}
{trigger}
{workflow}

I hope that helps,
Jorge

Kay June 11, 2021

Thank you for the hint. Problem is, that we don´t work with the standard groupnames. And we have here a second problem, i can´t choice a user or a group, i must take user and group or i received an error axception, cause the expected field has no value. 

It´s okay, so we can choice a group or a user (but not as required) and that works for us.

Thank you!

Jorge Merino
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.
June 17, 2021

Hi Kay,

You could build a workflow with two paths. 

The one that will set restrictions via the Confidential state or the other path via Public state that is not asking for user or groups:
Workflow Builder - Confluence 2021-06-17 11-53-12.png

It would look like this:

confide4.gif


{workflow:name=Testing required params|key=spaceworkflow--1134601481}
{description}
The Publishing Workflow has four states.
Ready: Edited by Staff. Reviewed: Reviewed by Managers. Published: Approved by Editor-in-Chief & viewable publicly.
You can define the Reviewer and Editor-in-Chief in the Space Admin Workflow Configuration.
{description}
{workflowparameter:Restrictions next state|description=Please add the users or groups separated by commas|edit=true}

{workflowparameter}
{state:Draft}
{state-selection:states=Public,Confidential}
{state}
{state:Public|approved=Reviewed|rejected=Draft|colour=#00B8D9}
{approval:Review public|assignable=true}
{state}
{state:Reviewed|approved=Published|rejected=Draft}
{approval:Final approval|assignable=true}
{state}
{state:Published|final=true|rejected=Reviewed|updated=Reviewed|hideselection=true}
{state}
{state:Confidential|approved=Reviewed|taskable=true|colour=#FF5630|requiredparams=Restrictions next state}
{approval:Review confidential|assignable=true}
{state}
{trigger:statechanged|state=Confidential}
{add-restriction:type=view|user=@Restrictions next state@}
{add-restriction:type=edit|user=@Restrictions next state@}
{trigger}
{trigger:statechanged|state=Public}
{remove-restriction:type=view}
{remove-restriction:type=edit}
{trigger}
{workflow}

BR,
Jorge 

Kay June 17, 2021

Thank you so much!

I will test it :) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events