Hello,
This module is still working very well for me, but I do have a feature request that would make it perfect for me.
In our workflow with 5 states or so, we want to allow scheduled state changes from only 2 workflow states. When the content is in one of the other workflow states, the user should not be tempted to try and schedule anything. The form should simply not appear.
Because there is currently only one permission, Access Scheduled Publish pages, the feature is either on for all states or off for all states. This is not granular enough for our use-case.
I see 2 possible implementations.
1)
The first one, the fancy user-friendly one, would allow/disallow the widget to appear via a column of check boxes, very much like the current Workflow states definition page, eg admin/config/workflow/workflows/manage/editorial.

In fact, maybe this already existing Workflow states form could be re-purposed (rather than re-created on another page) and the column added via a form_alter, while processing of the new column of boxes could be done in an additional #submit function.
2)
The second, low-tech solution would be to include the name of the current workflow state in the outer div, as class name:
<div id="scheduled-publish-form-field_..." class="state-MACHINENAME" ....
For example when the content is currently in the "draft" state, the outer div containing the widget/form would have the "class=state-draft":
<div id="scheduled-publish-form-field_..." class="state-draft" ....
Then a developer can hard-code the suppression of the widget/form when content is in "draft" or "published" with a few lines of CSS:
div.state-draft,
div.state-published {
display:none;
}
For all other workflow state the widget/form would appear as per normal.
What do you think?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | editorial workflow D8.png | 154.78 KB | rdeboer |
Comments
Comment #2
rdeboerComment #3
rdeboerComment #4
rdeboerComment #5
rdeboerComment #6
rdeboerComment #7
saschahannes commentedHello,
sounds like a great feature!
At the moment I can spent just a few hours in a month for open-source software projects.
I'll will take a look at your first implementation and combine it with an additional field for the workflows configuration.
But it will take some time.
Kind Regards,
Sascha
Comment #8
rdeboerHi Sascha,
Thank you for the quick reply. I understand completely. I may be able to help. But of course I don't know the code as well as you do.
Thanks for your continued work on this great module.
Best regards,
Rik
Comment #9
rdeboerH Sascha,
I've had some more chats with the future recipients of this feature and they tell me it should be more sophisticated than option 1) in the original feature description.
:-(
In their editorial workflow there are only two transitions that they may want to schedule: In-review --> Published and Published --> Archived.
So it would be confusing/tempting/wrong to show the widget/form with ALL of the possible state transitions from "In-review" and "Published", as most of these are not allowed in their business-case.
But in my current proposal these could still be executed by an ignorant or malicious staff member.
So I see 2 solutions:
1) Instead of a column of check boxes (as displayed in the mock-up above) have a column of multi-select drop-downs. Each drop-down would be pre-populated with the allowed transitions out of the workflow state (on the left). Then the workflow builder/administrator would select a subset from those transitions to determine on what workflow states the Scheduled Publish widget/form would show. For each role this would still be subject to the normal Content Moderation transition permissions ticked on the admin/people/permissions page.
OR:
2) Replicate the entire transition permissions "matrix" of check boxes on the admin/people/permissions page under the heading Content Moderation to the heading Scheduled Publish.
This matrix would then serve the purpose of allowing which role can do which scheduled transitions. This would still be subject to the Content Moderation transition permissions. So a user would need permissions for both in order to schedule that transition.
This matrix of permissions would replace the existing "Access Scheduled Publish pages" row of permissions check boxes.
This second solution may be the easiest to implement. Not sure.
What do you think?
Happy to work on this with you where I can.