Lightning Scheduler: Scheduled transition should not be deleted if it can be executed when the content reaches a new state

Created on 8 November 2018, about 6 years ago
Updated 5 August 2024, 5 months ago

Sample workflow: Draft > Ready for Review > In Review > Ready for Publishing > Published.

Use case: User w/ Role X has permissions to create a Draft, to transition the Draft to "Ready for Review" state and schedule publishing date, so that User w/ role Y (who has permission to move content to "Ready for Publishing" state) understands when the content must be published.

Bug: User w/ role X schedules a transition to Publish state. Lightning Scheduler Cron runs and deletes the scheduled transition because content can not be moved from "Draft" or "Ready for Review" to "Published" state according to the defined Workflow.

Expectation: Lightning Scheduler Cron runs and keeps the transition in queue until the content reaches the state from which it can be moved to the state defined in the scheduled transition.

Patch that fixes this bug is attached.

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oksana-c

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    Right now the module processes all the content's latest revision where there's a transition saved and the transition date is in the past. It does not collect them to queue, during cron run it requests from the database which contents to process right now. Leaving invalid transitions there would mean the same exact contents would be loaded and skipped during cron run again and again and again with nothing happening to them.

    So for your proposal to work, the module would needed to be rewritten to using queues. You might just check out other scheduling modules instead.

Production build 0.71.5 2024