Skip to content
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/report#23 - Fix contact sub-type 'is not one of' filtering #15971

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

aydun
Copy link
Contributor

@aydun aydun commented Nov 27, 2019

Overview

When filtering by contact sub-type using 'is not one of' do not exclude where sub-type is null.

Before

When filtering by contact sub-type in a report using 'is not one of', only contacts with a sub-type are returned. For example, 'is not one of' 'Student' excludes Students and all those with no sub-type.

After

Contacts with no sub-type are included, so the only ones excluded are the Students.

Technical Details

This adds unit tests for contact sub-type 'is one of' and 'is not one of'.

It also tightens the matching on sub-type to avoid problems where one contact sub-type is a substring of another.

Comments

See also https://lab.civicrm.org/dev/report/issues/23
https://lab.civicrm.org/dev/report/issues/15#note_25491

@civibot
Copy link

civibot bot commented Nov 27, 2019

(Standard links)

@civibot civibot bot added the master label Nov 27, 2019
When filtering by contact sub-type using 'is not one of' do not exclude where sub-type is null.

Add unit tests for contact sub-type 'is one of' and 'is not one of'
Tighten the matching on sub-type to avoid problems where one contact sub-type is a substring of another.
@lolaslade
Copy link
Contributor

Thanks! This patch worked for me.

@mlutfy mlutfy added the has-test label Dec 2, 2019
@mlutfy
Copy link
Member

mlutfy commented Dec 2, 2019

Merging based on:

  • Review by Lola
  • Code review
  • Has test 🎉

@mlutfy mlutfy merged commit a100425 into civicrm:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants