Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.11
-
Fix Version/s: 4.7.13
-
Component/s: CiviCRM API
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Filtering by parent_id in the Navigation.get API won't work. Using an integer fails validation because it isn't an option in Navigation.getoptions, and using a field name fails because it isn't an integer.
Removing the "pseudoconstant" item under the parent_id in the DAO/schema makes it work perfectly from my perspective. However, it was explicitly added in https://github.com/civicrm/civicrm-core/pull/6892, probably for a good reason, so I'm hesitant to simply roll that back.
It appears that simply modifying the DAO/schema for parent_id to have "id" as the keyColumn and "name" as the nameColumn makes the API work as expected from my perspective. However, that use of the "name" as pseudoconstant key was explicitly added in CRM-17225 / https://github.com/civicrm/civicrm-core/pull/6892, and I'm not sure what might break over in reports.