Affects Version/s: 7.1.X, Master
Component/s: User Management > Users & Organizations
Backported to Branch:Committed
Sprint:U&SM | S02 Sprint 18, U&SM | S02 Sprint 19
Git Pull Request:
When creating a new Organization type, it is possible to specify a type with no possible children types. However, when doing so, an empty string is saved, and thus later returned when checking for children types. This results in the OrganizationImpl.isParentable returning true as well as a blank value appearing as a possible child type. This is loosely intended since validation of children types is done when attempting to save an organization, not when configuring the type.
Steps to Reproduce:
- Go to Control Panel > Configuration > System Settings > Users > Organization Types
- Add a new entry with the following values:
- Name: Location
- (leave the checkboxes as-is)
- Children Types: (remove the children types value)
- Save the entry
- Go to Control Panel > Users > Users and Organizations
- On the "Organizations" tab, click the Add button and select "Location"
- Fill in any required fields and save the Locations org type.
- Go back to the Users and Organizations > Organizations tab
- Click on the elipses icon to the right of the newly created Location
Expected Results: Since the Location org type has no children types, there is no "Add" option for children types
Actual; Results: The option "Add " exists, since it is not possible to save a completely empty value for the children types, only a blank string.
Reproduced in master: 5f56505b58ea180df52994f43df877efd9529593