1

I've noticed the upgrade to the activity search now lets you search either the Subject or details of an activity (I'm in Civi 5.5.3, Drupal 7.59) which is great but on the Advanced search screen it seems to use the strict "=" qualifier.

I've verified the following behavior of the demo site (5.8) as well:

  • Run an Advanced search for an activity that contains "Tell a Friend" in the subject line - no results.
  • Run an activity search for an activity that contains "Tell a Friend" in the subject line - returns all the activities that subject line contains the search term, including "Subject for Tell a Friend".
  • Same problem when you search details or both.

I can see in feedback for the the blank search results:

No matches found for:
Activity targeted to ...AND...
Activity Text (Subject Only) = 'Tell a Friend' ...AND...
Activity Status In Completed

Versus the summary that shows on the full set of results:

Activity targeted to ...AND...
Activity Text (Subject Only) Like '%Tell a Friend%' ...AND...
Activity Status In Completed

I'd like to use advanced search so that I can return contact results and add them to a group. Any idea where I take a look to change the Advanced Search from "=" to "LIKE"?

Also, any idea if this was intentional behavior - it doesn't seem like it would be very useful but maybe that's me? Is this worthy of a bug report?

2

You can use wildcard characters (%xxxx%) in search to change the default operator of "=" to "LIKE" - e.g. on demo:

Using Search > Find Activities:

  1. Activity Text = Tell a Friend
  2. Status = Scheduled, Completed
  3. Generates the same query as you listed in your question and at the time I write results in 204 records:

    Activity targeted to ...AND...

    Activity Text (Subject Only) Like '%Tell a Friend%' ...AND...

    Activity Status In Scheduled, Completed

The same query is generated when using Search > Advanced Search with the following parameters:

  1. Activity Text = %Tell a Friend%
  2. Status = Scheduled, Completed

The above returns 89 contacts, but if you display the results as activities, you get the same 204 that you did using Search > Find Activities.

Hope this helps, Tamar

  • Thank you, that does help (and works of course). It is a little odd that that field is no longer a 'contains' search - as I'm not sure you'd likely have the details of an activity as an exact string. While the wildcard search absolutely works it seems it might be an extra step. I might submit it as a bug to see if the team believes that the behavior is worth adjusting. – RayWright Oct 17 '18 at 12:32
  • Hi Ray, the team would most likely consider this an improvement and as it would not be considered critical, would move it to the paid issue queue - a label that fixes and improvements that are prioritized by the core team and requires funding/contributed fix from the community, but glad I was able to help you in any case. – Tamar Meir - Cividesk Oct 17 '18 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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