1

When performing a contacts search using SearchKit, I'd like to be able to get a list of notes associated with a contact (e.g. return all the notes associated with them). If I search on Notes with Contacts I can get a list, but if I search on Contacts with Notes I don't get any results. What's interesting is that it works on some older records, but not newer ones, so not sure if there's been a schema change at some point that's breaking things.

Steps to reproduce:

  • Add a few notes to one or more contacts
  • Create a SearchKit Search for "Contacts" With (Required) Contact Notes
  • Add Note ID and Note to the report columns
  • (Optionally) set the field transformations to List for Note ID and Note
  • Execute the search

Expected results: A list of Contacts that have Notes associated with them, with the Notes detail in the related columns.

Actual results: No results

I tried this on https://dmaster.demo.civicrm.org/ as well.

Am I not understanding how this should work?

Does not work (Contacts) SearchKit Report on Contacts

Works (Notes) SearchKit Report on Notes

1 Answer 1

1

If you expand the query info section it's interpreting the query as "notes entered by that contact", so the "older" ones might have been ones like that.

3
  • Thankees, that is exactly it on the results that show up, and I missed that. Is the query that's generated expected? It feels a little non-intuitive, and I'm wondering if it's a bug (which I'm happy to file), or if I'm missing how to display the notes (there's a Contact Notes Created By where I'd expect this, but not with the Contact Notes itself). Feb 26, 2023 at 21:29
  • I don't know if it's expected.
    – Demerit
    Feb 26, 2023 at 23:56
  • 1
    It looks like somebody else noticed the same issue and there's a fix pending: github.com/civicrm/civicrm-core/pull/25672
    – Demerit
    Feb 27, 2023 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.