When you filter the terms shown in the widget using the parent id and choose the option to automatically select parent terms, these are limited by the parent term.

For example with this vocabulary :

- Plant
-- Fruit
--- Tomato
--- Strawberry
--- Apple
-- Vegetable
--- ...
- Animal
-- ...

If you choose "Plant" as parent term the widget will show :

- Fruit
-- Tomato
-- Strawberry
-- Apple
- Vegetable
-- ...

If you check "Apple", with the automatic parent selection option, "Fruit" and "Apple" will be selected but not "Plant" which is not shown in the widget.
I think it works as designed so I create this issue as a feature request but many people won't understand why it is working like this and they would like to have the choice to auto select parents into the subtree or in the entire tree.

Comments

hephaestus’s picture

Do you have any ideas on the best way to implement this DuaelFr? I might take a look at producing a patch, as I have a project requiring this behaviour.

duaelfr’s picture

I think you may add a custom validator on the field in case its parent selection option is checked then loop on all selected terms in this validator to add their parents manually.

I don't know if it is the best way but I would start from here.
Good luck :)

Taxoman’s picture

For reference; related issue: #1517994: Parent ID selection

vladimiraus’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Thank you everyone for your contribution.
Drupal 7 is no longer supported but we always need support for Drupal 11 version.
Closing as outdated.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.