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

savedSearch create API and BAO ignore custom search ID field

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.16
    • Fix Version/s: None
    • Component/s: CiviCRM Search
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      The SavedSearch BAO refers to a field custom_search_id while the column in the DB is named search_custom_id. The result is that the value can't be set at all through the BAO.

      This seems like a straightforward fix, despite the fact that the code hasn't changed in 4+ years:

      • getting the BAO to behave as expected is probably a one-line fix
      • neither the correct nor the transposed version of the field name affects the behavior of this function when passed as an argument, so there doesn't appear to be any need to support any legacy behaviors.

      What is unclear is how saved searches are associated with custom searches at all, since taking the relevant actions in the UI does cause the field to be populated as expected. There must be a hack/workaround somewhere or this wouldn't be the case. While unlikely, it is possible that the workaround and a corrected BAO would be incompatible (or simply redundant) – this should be investigated before the ticket is closed out.

        Attachments

          Activity

            People

            • Assignee:
              pittstains Frank J. Gómez
              Reporter:
              pittstains Frank J. Gómez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: