Download & Extend

"Publish unless Scheduled" and "Unpublish unless Scheduled" Actions

Project:Scheduler
Version:5.x-1.12
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

I know this may be a fringe use case, but I'm working on a site using both Workflow/Actions AND Scheduler. In a nutshell, here's our use case:

* Submitter adds a new node, and has the option of using the Scheduler "publish on" field to indicate that they want it to go live at a later date
* Node remains unpublished and goes into a "Needs review" workflow state
* Reviewer looks at the node and may choose a "Approved" workflow state, which normally triggers the stock 'Publish node' action

The problem is that this will always immediately publish the node, even if the submitter has specified a later date and time per the Scheduler module.

We are not using the "Schedule for state change" section of the workflow form because:

1) The submitter doesn't get to see it
2) The reviewer shouldn't have to manually copy a date from somewhere else

This patch provides two new actions:

* "Publish unless Scheduled": when triggered, checks whether $node->scheduler['publish_on'] is empty; if yes, the node is published immediately. If no, it is left alone.
* "Unpublish unless Scheduled": when triggered, checks whether $node->scheduler['unpublish_on'] is empty; if yes, the node is unpublished immediately. If no, it is left alone.

The patch also provides installer update/uninstall functions to add/remove the new actions to the actions_registry table.

AttachmentSize
scheduler_actions_publish.patch3.74 KB

Comments

#1

Hmmh... I tried this patch but the actions didn't get visible in actions menus. What version of actions-module is this patch for? I'm willing to include this in a future release, if I can see it working.

#2

Status:needs review» postponed (maintainer needs more info)

#3

Hmm, did you run /update.php as user 1 after applying the patch?

#4

That was the first thing I did after applying ;) Then I installed workflow-module and saw that its actions went to the list as they should.

I'm not too familiar with actions module, but I noticed that workflow-module has function workflow_action_info(), which seems to declare the actions. This patch doesn't have that but instead functions prefixed with action_scheduler_ . That's why I suspect different major version. I tried 5.x-2.3.

(Just to remind me later: there's a typo in function name schedules_uninstall.)

#5

Is this still an issue?

#6

I'd suspect not. Anyways, I couldn't get the patch working. I didn't inspect this issue too deeply, but I'd say that the patch wasn't for workflow version 2.3, but probably version 1.x.

#7

Status:postponed (maintainer needs more info)» postponed

I like the idea of this. It might prove usefull later, so I am not closing it.

#8

usonian, is this still relevant?

#9

Status:postponed» closed (won't fix)
nobody click here