Problem/Motivation
Right now this module only allows appending (for multi-value fields) or replacing (for single-value fields). It would be nice to present the following options instead:
- Append
- Replace
- Remove
- Clear
"Append" and "Remove" would only be shown for multi-value fields. "Remove" would take whatever term(s) were selected and remove them and only them from the node.
If "Clear" was selected, then the field for selecting terms becomes hidden as it's not relevant.
This feature would really expand the usefulness of the module. It would allow for the following scenario we encounter often: Deciding to create a new taxonomy vocabulary and field. We need to "move" terms from one reference field to the other. So we need to both remove the term from one field and add to another.
Note the project detail page on Drupal.org lists this as a TODO: "Allow appending or fully setting values to multi-value term fields."
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
We'll now have a fieldset around each field on the selection form. Each fieldset will contain a new "actions" input along with the existing term assignment select drop-down or autocomplete. Here's a screenshot:

API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | new_assignment_interface.jpg | 373.37 KB | bkosborne |
Issue fork bulk_edit_terms-3532102
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
bkosborneComment #3
fjgarlin commentedComment #5
bkosborneOkay, ready for review!
Comment #6
fjgarlin commentedThis is a great feature! Thanks for also adding tests for it.
I just left some cosmetic feedback on the MR.
Comment #7
bkosborneAgreed we should be consistent! I converted all the local vars to snake case. I do use camelCase for everything most of the time out of habit, but I think the module already was using snake_case, so I switched to using that.
Thanks for the quick reviews!
Comment #8
fjgarlin commentedThis is looking really good. The new/extra tests give so much confidence in the changes too. RTBC.
I'm going to do a local test and then merge after that.
Comment #10
fjgarlin commentedThis is now merged. Thanks so much!
Comment #11
fjgarlin commentedI created the tag 2.0.0 with this change, making the first 2.x release with D11 support.
https://www.drupal.org/project/bulk_edit_terms/releases/2.0.0