So far, I’ve managed to include the list of owners in the batch-edit form, but as the plugin is originally built to work on a single Item at a time, I would need to cycle through the Items selected in the form. Point is: I cannot find where the other changes from that form are processed, I can see it should happen in batch-edit-save but cannot find such a file or function… anybody could help me on this?
After following your hint, @kloor, I’ve used the admin_items_batch_edit_form hook to add to the items/batch-edit page a combobox listing all site users:
The only thing I notice at a glance is that you are only checking if owner_id exists in $args['custom'] but not that it necessarily has a value, or that that value can be found in the user table before attempting to set it as the owner. Perhaps the select box isn’t working correctly, and only sending an empty value?
Are you logging errors, and have you checked the error log?
I have checked every single step of the algorithm, and the ItemsBatchEditCustom hook is receiving the correct values and applying the correct one.
Also the function perform in ItemBatchEdit is applying the change (if I check just before release_object($item), the item’s owner is the new one.
But, for some reason, when I get back to ItemsController, if I check after $dispatcher->send('Job_ItemBatchEdit', $options), no change is visible and the old owner is still there. I wonder whether that’s where the issue resides…