As folluw up of #1188258: Provide a rules action that allows loading all entities from a view into Rules., I'd propose to add an action that skips the "entity_load" part of the present action. That is helpful for actions and further processing that only need the id (e.g nid) or will load the entity itself later in processing (like batch or scheduled actions).

There is a similar issue created by me in Rules Bonus (#1367324: How to: Load a Entity ID list with Views), but as it recommends to use VBO for the "load entities from view" action, it would be better, that action could be provided in VBO ;)

I'll attach a patch for that in the next comment.

CommentFileSizeAuthor
#1 vbo_entity_id_load-1385222-1.patch3.14 KBderhasi

Comments

derhasi’s picture

Status: Active » Needs review
StatusFileSize
new3.14 KB

And there is the patch file ;)

itangalo’s picture

Just wanted to say that I think this feature makes sense to me.
+1

bojanz’s picture

Status: Needs review » Fixed

Makes sense.

Made an additional change:

   foreach ($vbo->view->result as $row_index => $result) {
-    $ids[] = $result->{$vbo->field_alias};
+    $ids[] = $vbo->get_value($result);
   }

to match a similar change done elsewhere in VBO (so that it works with search api views as well).

Committed and pushed.
Sorry for the delay.

derhasi’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.