Configurable Reports Custom User Profile Field Filter is a "like" and not an "equals"

Configurable Reports Custom User Profile Field Filter is a "like" and not an "equals"

by Kristin Kilburn -
Number of replies: 4

CR Plugin Version - 

3.8.0 (2019122000)

 

Using the query below in the CR plugin, it seems as though the user field filter is using a "like" matching instead of an "equals" matching.  For example, if you choose "EA" from the filter dropdown, the results include any record that has EA anywhere in the given filtered field.  Am I coding this filter correctly?  Is this a bug?

 

Select *
from prefix_user_info_data uid
where uid.fieldid = 67
%%FILTER_USERS:uid.data%%

 

Screenshot of filter chosen is attached.

 

Thanks in advance.

Kristin

Attachment Filterselection.png
Average of ratings: Useful (1)
In reply to Kristin Kilburn

Re: Configurable Reports Custom User Profile Field Filter is a "like" and not an "equals"

by Ben Haensel -
As noted on this site, you should be able to provide an operator such as a greater or less than sign. I have reports that use to work that way, and now the operators break the filter. This may be a bug that needs to be fixed. Sara, could you please weigh in on this if you're monitoring this forum? Thank you! -Ben

http://opensourceelearning.blogspot.com/2015/
Average of ratings: Useful (1)
In reply to Kristin Kilburn

Re: Configurable Reports Custom User Profile Field Filter is a "like" and not an "equals"

by Ben Haensel -
Kristin-

This does look like a bug. When I turn on the error reporting when using a greater than operator, it's showing that it's still trying to use "like" logic. See the error code below. The filters will need a tracker item entered.

-Ben

----

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':> LIKE '%1358%' LIMIT 0, 5000' at line 5
Select uid.*
from mdl_user_info_data uid
where uid.fieldid = 5
and uid.userid in (86,275068,356042,41792,226633,431612,381167,361155,102,35426,453911,417045,5874)
AND uid.data:> LIKE '%1358%' LIMIT 0, 5000
[array (
)]
Error code: dmlreadexception
In reply to Ben Haensel

Re: Configurable Reports Custom User Profile Field Filter is a "like" and not an "equals"

by Kristin Kilburn -
In reply to Kristin Kilburn

Re: Configurable Reports Custom User Profile Field Filter is a "like" and not an "equals"

by Ben Haensel -
Thanks so much for submitting this Kristin! -Ben