Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19437

Navigation API won't allow filter on parent_id

    Details

    • 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.

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              andrewhunt Andrew Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: