It would be great to integrate Workbench with Views Bulk Operations (http://drupal.org/project/views_bulk_operations), to be able to build content management interfaces for different kinds of users (editors, publishers, ...). That would make it possible, aside from the workbench landing page being a good overview of what's going on with the content of a site, to intervene in the site's content flow right from that page (a definition of possible tasks is needed here).

eg.: WB could come with a default VBO-view provided, which would be configurable by the site-builder; if the site builder needs more control, there's always the option of using a self-built VBO-view.

Comments

stevector’s picture

Status: Active » Closed (duplicate)

Thanks brunodbo,

VBO would be a big help.

I think we can get VBO integration with actions: #1115992: Actions integration

Before we provide more default Views I think we should answer how we handle overriding those Views: #1109672: Allow exports of overridden to Views

stevector’s picture

Status: Closed (duplicate) » Active

Sorry, didn't intend to close this issue.

devtherock’s picture

Hi

I am working in a project where we need moderation control on contents, so we use workbench and vbo(view bulk operation), but workbench isn't supporting vbo right now. So I have create a snippet which you can use. This snippet will show all state in vbo operations. You just need to put this in your custom module and change 'custommodule' with your module name.


/* hook_node_operation */
function custommodule_node_operations() {
  foreach (workbench_moderation_states() as $key => $state) {
    $all_op[$key] = array(
		'label' => t("{$key} selected content"), 
		'callback' => 'custommodule_node_worflow_operations', 
		'callback arguments' => array('status' => "{$key}"),
   );
  }
  $operations = $all_op;
  return $operations;
}

/* callback function for node operation */
function custommodule_node_worflow_operations($nids, $status){
  $nodes = node_load_multiple($nids);
  foreach ($nodes as $node) {
    workbench_moderation_moderate($node, $status);
  }
}

Thanks

Dev/Kuldev

stevector’s picture

Thanks for the code devtherock!

Can you post that as a patch to workbench moderation over in this issue?

#1164176: Implement hook_node_operations() for workbench_moderation_moderate()

devtherock’s picture

agentrickard’s picture

See also #1088258: Support bulk assignment for Workbench Access.

Adam S’s picture

subscribing

bojanz’s picture

VBO for D7 got rewritten since this issue was first opened ;) It's now at beta2, and I'm planning an RC1 around Sep 15th.
I've become a Workbench fan recently (DrupalCon London), and would be happy to provide any guidance / help you need (though I'm hoping VBO's README.txt provides enough info as a start. Coupled with some nice core actions, should do the trick).

Note that hook_node_operations() is no longer supported in any way (core actions and Rules are more than enough, and provide better integration).

stevector’s picture

Thanks bojanz! I hadn't worked much with VBO since D6 and the rewrite seems like a great change. I recently started digging last week when I needed something like #1057158: Provide an action for modifying entity values or #1142062: Port taxonomy term operations to d7 .

I'm looking forward to getting this Workbench integration working. I'll get in contact if needed. So far the README has answered my questions.

robeano’s picture

Version: 7.x-1.0-beta5 » 7.x-1.x-dev
Priority: Normal » Minor

I think we can all see the benefit of supporting VBO in the Workbench Suite.

Workbench Access now provides bulk assignment.

What I need in this ticket is a list of reasonable tasks people want VBO integration to do. AFAIK I see only one possible need which is to allow bulk State assignment with Workbench Moderation. What are some other reasonable needs?

agentrickard’s picture

* Bulk assign content to Workbench Access sections
* Bulk assign users to Workbench Access sections

Anonymous’s picture

Just found this while trying to do the same thing. We are migrated hundreds of nodes to use Workbench and stop using dozens of custom Content Types. It would be awesome if we could use VBO so I can filter all content for the desired content types (not just one) and then set the Workbench Section, accordingly.

Thanks!

agentrickard’s picture

Project: Workbench » Workbench Access

Moving to the WA queue.

anandkp’s picture

Priority: Minor » Major

#11
Posted by agentrickard on October 7, 2011 at 5:43pm

* Bulk assign content to Workbench Access sections
* Bulk assign users to Workbench Access sections

As stated in the comment quoted above, I was just looking for a way to do this too. I'm adding a comment to this issue as it's been a long while since the last update to it. I'm also bumping up the priority cause of the same - this issue hasn't been looked at for a long while it seems.

Sorry if this is not the right way to bump an issue but I think that being able to bulk-update content sections through Views Bulk Operations would be super-awesome!

I was trying to do do exactly that. The reason for wanting to do this through a Views Bulk Operations View is because that can be used to be far more granular with conducting a search of relevant nodes. Considering that Workbench is a module that primarily targets sites with an intricate User to Node latticework, being able to search for all the nodes with a particular term and then mass update them to be in a section would be absolutely wonderful (legen.... dary...).

To the creators and maintainers of this series of modules, my heartfelt gratitude!

agentrickard’s picture

I just haven't had any time for it. Nice-to-have feature. Patches should go against -dev.

Granted, with the -dev version, you can use native taxonomy fields, which should provide out-of-the-box support for VBO.

anandkp’s picture

#15
Posted by agentrickard on July 9, 2012 at 8:40pm

I just haven't had any time for it. Nice-to-have feature. Patches should go against -dev.

Granted, with the -dev version, you can use native taxonomy fields, which should provide out-of-the-box support for VBO.

Could you clarify please? Was your comment in reply to mine?

agentrickard’s picture

@anandps Yes, it was.

In the -dev version, which is stable for use with Taxonomy, you can specify that you want to use native Taxonomy module fields instead of the "sections" field provided by Workbench Access. In that case, the taxonomy fields should already have VBO support, so you should be able to build the View you need without any new features being added.

mausolos’s picture

I agree, this is huge. anandps, if you get anywhere with this, would you mind posting something about what you actually did?

Kimeros’s picture

@agentrickard

Thanks for adding that. I've downloaded the dev version and I'm trying to find were I can set Workbench access to use a taxonomy field instead of sections. I have a taxonomy field called Team which is set for each page so I'd like not to have to set a sections field as well.

I can't see the setting option to change it. Can you please point me in the correct direction?

Cheers,
Kime.

Kimeros’s picture

Sorry, I found it - Under config/workbench/access/settings -> Access control fields -> turn off Require a Workbench Access form element.

Thanks again.

Anonymous’s picture

Kimeros: How has the -dev version of workbench access worked for you? Been stable?

edward.radau’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new5.69 KB

To address one of the issues in #11 I've implemented two custom actions which can be used via the Administration views for Users. One of which bulk assigns users to the specified sections the site builder chooses. The other does the opposite... removes users from the specified section. I can't remember if sections can be managed by anything other than taxonomies but if they can I've only tested scenarios where taxonomies are used since our site only uses them. Those other use cases would need to be tested.

Let me know if this is a good approach.

chrisgross’s picture

This may be old, but for anyone wondering, #22 does work for users. I'm sure that a similar approach would work for nodes, as well.

chrisgross’s picture

Here are a couple VBO actions for adding/removing nodes from editorial sections. If this and the above patch are acceptable solutions, I can roll them together.

chrisgross’s picture

StatusFileSize
new2.52 KB

Here's an updated version of my patch to handle single and multiple section assignments.

agentrickard’s picture

Please do.

fredonia_webteam’s picture

#25 tested and is working as intended. Please deploy.

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community
agentrickard’s picture

Status: Reviewed & tested by the community » Needs work

When I try to use this, I am not given an option to set a target section and the operation throws an error.

ArgumentCountError: Too few arguments to function workbench_access_node_form_element(), 1 passed in /Applications/MAMP/htdocs/workbench7/sites/all/modules/workbench_access/workbench_access.module on line 2217 and exactly 2 expected in workbench_access_node_form_element() (line 1480 of /Applications/MAMP/htdocs/workbench7/sites/all/modules/workbench_access/workbench_access.module).
agentrickard’s picture

This patch needs a proper re-roll to combine the two parts, presumably, #25 and #22.

dcloganguy’s picture

Workbench Access 7.x

Is there any possibility of adding the "select all x rows in this view" button, rather than just one page at a time? Often users are importing hundreds of rows and would then like to be able to assign all of these records to a workbench access section.

thanks
Milton

agentrickard’s picture

The 7.x branch is closed to new features.

agentrickard’s picture

Status: Needs work » Closed (won't fix)