When a node is published via Scheduler and a moderation state is set, the published revision always has two transitions. One to draft, then one to published.

This patch fixes it by;

  1. Make it easier to extend with implementations of scheduler_workbench_scheduler_api(); 1483c
  2. Receive $node by reference for implementations of hook_scheduler_publish_api(); 3e843
  3. Use Workbench Moderation's $node properties to trigger workbench_moderation_moderate() via hook_node_update() instead of calling it directly. This keeps the history cleaner because the moderation state is not reverted to draft when _scheduler_publish() calls node_save() but before _scheduler_workbench_publish() can set the new correct moderation state; 3e843

Item number 2 depends on a patch for Scheduler; #1660192: Expand options for integrating modules

This patch extends #1660208: Code style and line endings.

CommentFileSizeAuthor
single_transition.patch1.9 KBBevan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wwhurley’s picture

Assigned: Unassigned » wwhurley
Status: Needs review » Closed (fixed)

Tested and accepted. See at [a4db285]

wwhurley’s picture

Issue summary: View changes

Adding the patch's dependency.

iStryker’s picture

This patch breaks code. See situation in #2395013: Setting up Scheduler module first, then enabling Scheduler_Workbench breaks.. Leaving this issue close and working on solution in #2395013