English: A brief recipe describing how to create a bulk action to update content created dates. This recipe uses the Rules and Views Bulk Operations modules.
I have a view of randomly generated articles I'd like to be able to change the post date on multiple articles without having to edit them individually. To do this, I will rely on two additional modules: Rules, including the Rules UI and Views Bulk Operations.
In order for Views Bulk Operations to integrate with Rules we have to create, what are called, Components. Components are simply re-usable rules.
I'll add a new component, in this case I'll just add an Action Set. The action set will be called "change post date". It's affecting Articles, so I'll go ahead and add a tag of "articles".
The component can take variables. In this case, I'm going to pass in a node, labeled "article", and I'm going to ask the user for a date.
We'll need one action performed inside of this [rule] and that will be to "set a data value" on the article created date. For the "data value", I will switch to "data selection mode" and allow the end user to specify a post date.
That's it, the changes have been saved. I'll navigate to my view for articles. I'll add a new field. Right up top is the "Bulk operations" for content. I'll label this "operations". Down here you can select "change post date". And I'll save the view. I'll navigate to the articles view.And now there's an operations select box, including my "change post date".
In the checkbox column on the right side, I'll select several articles. [Use] my "change post date" operation. I'll simply change the year. Lets post these in 2012. It's going to confirm, perform the process on the selected items.Now, scrolling to the bottom I see I have three articles published in 2012.
|Author||Brylie Christopher Oxley|
I, the copyright holder of this work, hereby publish it under the following license:
Click on a date/time to view the file as it appeared at that time.
|current||07:35, 20 May 2014||1 min 59 s, 1,422 × 800 (7.6 MB)||Brylie||User created page with UploadWizard|
- You cannot overwrite this file.