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

Colleen Talbot November 14, 2013

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

1 vote
Answer accepted
Miguel Reimer
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.
November 18, 2013

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

Miguel Reimer
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.
November 22, 2013

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

Colleen Talbot November 25, 2013

New version works fine, Thanks.

0 votes
Miguel Reimer
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.
November 16, 2013

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

0 votes
Miguel Reimer
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.
November 15, 2013

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

0 votes
CharlesH
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.
November 14, 2013

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

Colleen Talbot November 14, 2013

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events