Patch (to be ported)
Project:
Field Actions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2008 at 14:46 UTC
Updated:
15 Nov 2013 at 18:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
deekayen commentedYou have my attention. Care to elaborate?
Comment #2
moshe weitzman commentedThe action's configuration would ask the admin to set which node ref he wants to set, and what the value of the node ref would be. Then when the action fires, it sets the node ref field to the specified nid. Hope that makes sense.
Comment #3
deekayen commentedIt does, though I can't get to writing the patch right now, I'd accept one to do that.
Comment #4
deekayen commentedAdded in cvs revision 1.6.2.2 (DRUPAL-6--1).
Comment #6
jon nunan commentedAny chance to get the reverse as well?
That way we can use VBO to select all the 'child nodes' in a relationship and then apply them in bulk to the one parent node.
I hacked this in for myself by putting the following code into 'field_assign_value_to_nodereference_action':
'nr_flip_value' is just a checkbox I added to the form to enable the new functionality when required.
Comment #7
hunmonk commentedhere's a post that completely lays out how to accomplish this in a custom module -- i'm sure it would be trivial to incorporate this into field actions:
http://drupal.org/node/628544
Comment #8
hunmonk commentedand, here's a patch that adds the requested functionality from #6. tested pretty thoroughly, and works perfectly for me.
i attached a screenshot of the configurable action form -- i'm not crazy about the usability of it, but there are complications with making it more elegant: namely, nodereference fields have to know the field in order for the fancy autocomplete to work properly. the best alternate approach i could think of was to start by displaying just the select of the nodereference fields, then on another form display the autocomplete for that field -- but i have no idea if multi-step even works w/ action forms, and/or if that would screw up how views bulk operations would work. therefore, i've decided that the current UI is fine as is... ;)
i also cleaned up the function that pulls all the nodereference fields, to also add the human-readable node type the field is attached to, and to sort on the descriptions.
Comment #9
deekayen commentedCommitted to 6.x-1.x. 7.x-1.x is pending.