Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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!

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 

Thank you so much!

I will test it :) 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Fine Software

Happy New Year, everybody! What better way to kick off 2022 than with a new Marketplace Partner Spotlight ✨ This month, we're getting to know Daniel Franz, co-founder of Fine Software. Fine Software ...

371 views 2 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you