Currently, a user is forced to edit a node in order to change its scheduling options. For node types set to 'create new revision' this often means uselessly creating new revisions each time that the schedule is changed, which can be further complicated by interactions with other modules such as workbench moderation.

In addition to the fieldset and vertical tab display options for scheduling, a "Separate tab" option should be added. This would provide a separate "Schedule" tab as a local task for the node at node/[%nid]/schedule.

Issue fork scheduler-2416135

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grasmash’s picture

Status: Active » Needs review
FileSize
7 KB
grasmash’s picture

Updating descriptions and titles.

jonathan1055’s picture

Hi grasmash,
This is an interesting idea, thanks for the patch, and I understand the use case for this feature.

I can see you call scheduler_node_presave() and have moved a section of common code out from scheduler_node_update() to a shared function. With your new option, is the plan that other modules would not "see" the schedule update? Or would they see some of it but not be able to react to all as they might do now.

Regarding the interaction with modules such as workbench moderation, have you tried your new version alongside Scheduler Workbench Integration module?

Jonathan

grasmash’s picture

Issue summary: View changes

With your new option, is the plan that other modules would not "see" the schedule update.

The plan was simply to decouple the scheduling action from the node update action. Now that you bring it up, I do see that this does prevent some other modules from reacting to a node being scheduled. To compensate for this, I would suggest adding a new hook that specifically allows modules to react to a node being scheduled, rather than reacting to the node being updated.

Something like: module_invoke_all('node_schedule', $node) within scheduler_update_node_schedule(). Let me know if you'd like me to add this to the patch.

Regarding the interaction with modules such as workbench moderation, have you tried your new version alongside Scheduler Workbench Integration module?

Yes, I am using that module. This feature was requested in that module's issue queue: #2244871: UX for scheduling unpublished of published content is poor, requires making new draft.

grasmash’s picture

Issue summary: View changes
grasmash’s picture

Issue summary: View changes
grasmash’s picture

Adding validation callback for new form.

jonathan1055’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

The plan was simply to decouple the scheduling action from the node update action.

This could be a good idea. I understand the use case for not wanting to do an entire node update cycling if all you want is to schedule for publication.

... a new hook that specifically allows modules to react to a node being scheduled, rather than reacting to the node being updated.

Yes we probably would need a new hook. We are also considering implementing event listeners, so that may impact the decisions here. See #2669164: Introduce event subscriber for the Scheduler hooks

Moving to the 8.x queue as new features would have to be implemented in D8 first.

realityloop’s picture

Status: Needs review » Needs work

Patch no longer applies

jonathan1055’s picture

Issue summary: View changes

Hi realityloop,
Did you mean that the patch does not apply at 7.x or 8.x? The patches were generated for Scheduler 7.x but new features now need to be evaluated/implemented in 8.x first. There has not been any patch for 8.x yet.

I presume this is a feature that you would like, otherwise you would not be reporting about the patch. There is quite a bit of discussion and some new ideas in the thread above. What are your views on how we should proceed with this?

realityloop’s picture

@jonathan1055

Ah, I thought they were against 8.x, sorry.

wranvaud made their first commit to this issue’s fork.

wranvaud’s picture

Re-rolling patch #7 fixing permissions. This is a minor change in the permission name. The current patch will only allow admins to view the scheduler tab on nodes.

-   return $display_tab && user_access('schedule (un)publishing of nodes') && node_access('update', $node);
+  return $display_tab && user_access('schedule publishing of nodes') && node_access('update', $node);
jonathan1055’s picture

Hi @wranvaud
Thanks for your re-roll. However, just to be clear, patch #7 (and now #13) are created against 7.x-1.x. If there is going to be any commit to Scheduler it will have to be done at 8.x first. Currently there is no patch for that, so if you have a need for this functionality it would be great if you could see how it might be done in drupal 8. This could be a very useful feature.
Thanks
Jonathan

jonathan1055’s picture

Version: 8.x-1.x-dev » 2.x-dev

New features now have to be added to the 2.x branch.