Workflow - Page restrictions don't work when creating page using template

I have an ad hoc workflow which applies view and edit restrictions to Confluence pages within a space. It has been tested using a blank page and all works as expected. When I have used a template (space or global) then the restrictions are not applied. How do I fix this?

4 answers

1 accepted

Hi,


Just to let you know that we have fixed the bug for our next release(Ad hoc Workflows 4.3.1) due in the next week or two. To be updated on new versions of Ad hoc Workflows please go to our Marketplace listing here - https://marketplace.atlassian.com/plugins/com.comalatech.workflow - click on the Details tab then again on "Watch Add-on". An email will then be automatically sent out whenever a new version is released.

Thanks,
Miguel

Quick update on that - 4.3.1 was released a couple days ago. Please try it out and let us know if you have any more issues.

Thanks,
Miguel

New version works fine, Thanks.

Is you workflow operating on all pages in a space, or just those with a certain label?

It's a space level workflow, applied to all pages. With a space template the red lock appears but when clicked on shows no restrictions.

Hi Colleen/Charles,

I have confirmed that an issue does exist with Ad hoc Workflows in Confluence 5+ where triggers fire but {add-restriction} doesn't work on triggers fired upon page creation when created a page from a template/blueprint.

Not sure on why or where the problem originates(Confluence or Ad hoc Workflows) but I've logged a bug for the developers to look into it.

Thanks,
Miguel

Not sure on fix date, but in a previous reporting of this issue one of my coworkers had come up with a workaround. The workaround is to add a new initial state before your first state, set a 1 minute due date on it and have it automatically change to your actual first state after about 1-2 minutes after the page is created.

Something like this:

{workflow}
    {state:Creation State|duedate=PT1M|expired=In Progress}
    {state}
    {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=In Progress} {add-restriction:type=View|user=@user@} {add-restriction:type=Edit|user=admin} {trigger} {workflow}

Basically all you need to do is insert a state(with whatever name you want) like "Creation State" above with the "expired" parameter set to your actual first state which in this case is "In Progress" Nothing else needs to be done to the workflow apart from insuring you use a statechanged trigger on your actual starting state. This new state won't be used again in future iterations of the workflow.

Thanks,
Miguel

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

309 views 11 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you