-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#1714 Fix mis-filtering on activity type #17215
Conversation
This fixes a bug where the activity_type_id was being compared against the label of the option value
(Standard links)
|
I love how this deletes 40 lines of garbage and adds 60 lines of tests. |
@demeritcowboy @kcristiano any chance one of you can do further UI testing on this - because it targets the rc. Note there are some weird things still happening but I think they pre-exist |
I can do some tomorrow. |
@eileenmcnaughton I id an I also ran a number of other searches and could not find any issues. I would be more comfortable if we had more time, but I do think it is good to merge. |
@demeritcowboy I've merged this but your testing would still be helpful. Thanks for offering. |
Agree with @kcristiano more time would be better but as noted there's a slew of existing weirdnesses so could spend forever on this. Activity Status appears twice in the dropdown, there's a chunk of E_NOTICEs when you edit the smart group, Find Activities has always been weird regarding target_contact, etc... It does fix the stated problem. And adds some tests. |
@demeritcowboy the double activity status thing is because @colemanw renamed the title on id fields to 'Activity Status' not 'Activity Status ID'. In the search code it actually uses the title for the id field and the option group title for the psuedofield |
Overview
This fixes a bug where the activity_type_id was being compared against the label of the option value
Before
Using Search Builder -
Choose Activity - Activity Type - = - Tell a Friend.
Actual results - 0
Choose Activity - Activity Type ID - = - Tell a Friend. (Not listed as a ID just the label)
Actual results - 92
After
Filter correctly filters
Technical Details
Most of the code in the handling for the first bunch of fields was silly. I added a test for each field to ensure they would be non-weird without it all
Comments
https://lab.civicrm.org/dev/core/-/issues/1714