Posted by Katrina B on February 28, 2010 at 3:03am
Is there a way to "mass update" or "bulk update" more than one item in Workflow to a new status ... on a scheduled date and time?
I have seen View Bulk Operations mentioned as a way to mass update the Workflow status of items; the only problem with that approach is that the change is executed immediately. I need to be able to set the date and time of the change, rather than having the status of the items changed immediately.
Any suggestions?
Comments
Hi Katrina, Realise this is a
Hi Katrina,
Realise this is a bit late... I don't know how to do exactly what you want. Seems to me it should be a feature of VBO, and a quick search on the issue queue shows no hits for schedule (surprisingly). I know that Rules has a scheduler, but I doubt that would be invoked when using Rules with VBO.
However, maybe there's another way to get what you want. What's your end goal? If you take a look at the New York Observer's write-up their idea of editions might be something you could use?
Best,
Andy
Actually ...
Actually, Editions is one of the reasons why I need this functionality; the newspaper site I'm building will be using Editions so we can lay out pages online before they're visible to the public.
The problem is the stories that go on the Editions. We will be using Workflow for the stories; they will go into "Ready to place" status to indicate that the stories are ready to be placed in Editions. But then the stories need to go to "Public" about the same time that the Edition publishes (probably around 1 a.m. each day).
The stories can't go Public early because when they're Public, the Relevant Content module will pick them up and list them (and we don't want readers able to access tomorrow's stories today!).
There is a Drupal tech in the corporate office (on the other side of the country from me) who is trying to build a solution for me using VBO and Rules and Flag ... but his first attempt resulted in immediate publishing, rather than scheduled publishing. So we're still trying to come up with a solution!
Katrina
Site builder, writer, trainer, graphic designer
Ah, I see the problem with
Ah, I see the problem with Relevant Content. Is there any way to feed Relevant Content through a view? If so you could use a relationship and filter out published nodes of unpublished editions.
FWIW, if I was hand-rolling a solution I'd try to a) make a patch to add scheduling to VBO (bigger task but general solution to problem) or b) make a new action publish edition that changes the state of the edition node and all children to published. Then you can trigger the action when the workflow state of the edition changes to published, and use the built-in workflow scheduler to schedule the workflow state change of the edition. I think that would be relatively painless.
Cheers,
Andy
http://nodeone.se/drupal-plan
http://nodeone.se/drupal-planet/make-rules-dance-with-views-bulk-operations looks like it might solve the problem very neatly.
Need a simiple solution for non-technical users
If I were the only one handling the website, I could probably come up with a solution that I, personally, could use relatively simply, because I'm not highly intimidated by the Drupal interface (though I am NOT a programmer or coder ... even dealing with Rules has me baffled).
But this website will be handled daily by our newsroom staff ... and only two or three of them are computer-savvy enough to handle a complex solution. So I need a solution that is as simple as possible -- click here, choose this, click OK (or Save or Submit or whatever).
And, yes, Relevant Content is being displayed through a view ... and I've already modified settings for content types that ensure that they are "unpublished" while they're in the stages that precede "Public" -- and I set Triggers that automatically change content to "published" when it goes into the Public status in Workflow. (That was the workaround that the Drupal tech in our corporate office recommended).
i wish the "Scheduled Actions" was available for Drupal 6; if I could combine that with VBO, it would probably solve my problem!
Katrina
Site builder, writer, trainer, graphic designer
Arrggh, just wrote this all
Arrggh, just wrote this all up, was waitin for my internet connection to come back up (middle ages here) and my comp proper crashed on me.
So, yeah all of the approaches I mentioned are user-friendly, though a bit less developer-friendly :)
For the end-user, all of these are easy, as they rely on one workflow state - the state of the edition node. This can be changed easily with the workflow scheduler. I'd avoid the first method as it forces your system to ignore an article's published flag, and that could cause other problems (or more complex views) in other situations. Depending on how you have created the relationship between editions and articles you might need extra modules to create appropriate filters and relationships in your views. There's a module called relativity (among others) which lets you define complex child <-> parent relationships. If the children articles have nodereferences to the parent edition then you don't need any extra modules. If you have nodereferences in the parent edition, then you'd want to use something like nodereferrer to create a view of the children with an argument of the parent NID. (You can also create explicit back-references using rules, but I think that's an error-prone and over-complicated approach.)
Were it me, I think I'd go for the third option and use nodereferences. If you'd like any more details, please ask.
Thanks,
Andy
One more question ....
I'm not completely following your train of thought here (then again, my own brain is on overload, since our website goes live on March 31 and I have a HUGE list of things to get done before then), but here's my question:
If the edition is scheduled to "publish" at 1 a.m., can the stories associated with it be scheduled to go to "Public" (which also causes them to go from "unpublished" to "published") at the same time ... and all of this be done ahead of time?
See, our newsroom staff typically wraps up their work between 10 and 11 p.m. ... but the website stuff (Editions and stories) need to "publish" a couple of hours later. I need to make certain that whatever solution I come up with ensures that everything can be scheduled hours ahead of time, so no one has to be sitting at a computer at midnight or 1 a.m.
Will any of your solutions fit within that scenario?
Katrina
Site builder, writer, trainer, graphic designer
Absolutely, sorry I'm
Absolutely, sorry I'm obviously not being very clear. I'm going to ignore suggestion #1 from my list above and try and describe the other two a bit better.
What we're doing is triggering a rule to run when the edition itself is published. The rule then publishes (or changes workflow state, or whatever you want) all stories attached to the edition. The scheduler included with the workflow module can handle publishing the edition at whatever time you want. So all you need to do is to create the triggered rule. The ideas in #2 and #3 are analagous - in #2 you're creating a custom action to publish all stories attached to the edition; in #3 you're using VBO to publish all stories attached to the edition.
The key point, either way, is that nobody manually touches the stories' status. When the edition goes live, the rule gets triggered, and the stories have their status automatically changed.
I think the easiest method is #3, as it involves no coding. The easiest way to implement #3 is if you have a nodereference to the parent edition in every story. Things get a bit more complicated if you have a nodereference to the stories in the edition. What kind of relationship between the editions and stories do you currently have?
Another potential problem
Here's another potential problem with this solution: Stories can be associated with multiple editions -- the same story may run for several days, while other stories in the edition get changed out, or one story may be listed under "Local news," "News" (the parent section that includes "Local news," "State news," "National news," and "World news") and "Today's news (the front page).
So it's not always possible to have just one parent edition.
The solution that the tech lead assigned to the project came up with -- using Flag, Rules, and VBO -- seems to be working (once we got a few bugs cleared up); I may stick with that ... but I really appreciate all the time and effort you've put into this.
Katrina
Site builder, writer, trainer, graphic designer
Glad it's solved. Just in
Glad it's solved. Just in case, the methods I described can work with multiple parents: you just need to put the nodereference in the edition and use a module like nodereferrer to create the view.
Did you look at the Scheduler
Did you look at the Scheduler module? Very easy for users -- options right on the add/edit form. I think that you'd need to modify to work with bulk change, as I don't recall seeing that as an option.
But, it is a great module.