I'm currently using VBO to flag (or unflag) nodes en masse. This works fine but in order to edit the flag fields, the user must do this for each node individually. I'm trying to take the functionality one step further by also allowing for the mass editing of the flagging fields.

The ideal solution would allow users to select multiple nodes to mass flag while also being able to edit the details of that flag in the same action. Is there a way to do this with the current versions of Flag and VBO? Help awaited.



joachim’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Category: support » feature

The VBO action edits entities. Here what you're after is creating entities.
You could see if there's a way to chain the two actions in some way, and first create the flaggings and then pass them to the edit action.
Alternately, you could extend the flag action to have the entity fields in the confirm form.

ilreports’s picture

Thanks for the reply.

Am I after creating entities by flagging them? The users aren't creating content. They are only flagging existing content that is created administratively. The "flag fields" I mentioned are the fields that I have in the confirm already.

It works when flagging nodes individually. I'm just trying to figure out a way to do have have the confirm form apply to multiple nodes at once and am trying to figure out the best approach.

ilreports’s picture

Conversely, simply flagging multiple nodes at once also works well with VBO. It's the additional items in the confirmation form that I'm also trying to reach in a mass action, if that makes sense.

joachim’s picture

> Am I after creating entities by flagging them?

Yes, each flagging is itself an entity. That's the thing you want to set field values on, isn't it?

ilreports’s picture

Ok understood. I didn't realize that the flaggings were themselves entities.

ilreports’s picture

However, that leads me wonder why, given that they're entities, are their fields not editable with VBO?

joachim’s picture

They are -- but the entities need to exist first for VBO to be able to operate on them!

Yuri’s picture

Issue summary: View changes

Have one of you been able to actually use Rules to set the field values of flaggings?
I can't see how to fetch the flagging entity and make the fields available.

MacaroniDuck’s picture

Was this ever resolved?

This was very easily accomplished in Drupal 6. You could set the View Style to Bulk Operations and have a flag action complete on multiple nodes without additional screens. I'm not seeing that this is possible in 7.

joachim’s picture

> Was this ever resolved?

Someone needs to write a patch for this -- or pay a developer to write a patch -- then post it here and have it reviewed, then committed.

apmsooner’s picture

Status: Active » Closed (duplicate)
Parent issue: » #2269391: Add rules action to fetch flagging by user for a particular entity

Heres the patch that will resolve this: https://www.drupal.org/node/2269391