View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004722||phpList 3 plugins||General||public||15-11-05 03:18||19-11-19 22:33|
|Summary||0004722: Selection criteria problem with checkbox attribute.|
|Description||Selection criteria doesn't work on imported users where the original data stream contained a zero that was assigned to a checkbox attribute. Subsequently using the checkbox attribute and testing for box "NOT CHECKED" fails.|
|Additional Information||1) Create an attribute of type "checkbox".|
2) Import users where a data value of 0 or 1 is assigned to the checkbox attribute above.
3) Values of 1 show up in the user_attribute table as "on", Values of 0 (zero) appear in the user_attribute table as "NULL".
3) Now use the checkbox attribute in the selection criteria for sending a message. Choose when attribute "is NOT checked". No users are selected for sending.
It appears that the NULL in the attribute table isn't being properly evaluated. In reviewing the message from the "View" option, the userselection shows "select table1.userid from phplist_user_user_attribute as table1 where table1.attributeid = 18 and ( table1.value = "" or table1.value = "0" or table1.value = "off")".
Apparently need to add another conditional "or tabel1.value is null"
|Tags||No tags attached.|
Either change the userselection logic to include "or tabel1.value is null" OR modify the user import routines to assign "off" to the attribute value when the import data is "0" (zero).
||Nick Lawson reported doing "UPDATE phplist_user_user_attribute SET value = '' WHERE value IS NULL;" which sorted it.|
||just tried and empty checkbox imports are now set to "off" in the DB|
Possibly related to this forum post: http://forums.phplist.com/viewtopic.php?t=14584
No phplist version or system info specified.
**** START QUOTE****
I added a checkbox option to my user attributes and the default of this field was NULL however when I set the criteria in the phplist interface while sending message it created an incorrect SQL query where
it should have been
table1.attributeid = 6 and ( table1.value IS NULL)
it had something LIKE
table1.attributeid = 6 and ( table1.value = 0)
Point being is the "IS NULL" needs to be there.
**** END QUOTE****
||Any progress on this bug?|
||sorry posted request for status update in error. can't figure out how to delete the note(s)|
||I just checked and empty checkboxes are still (in trunk) imported with a NULL value in the DB. So, this issue may still occur. However the selection criteria have now moved to a plugin, so will move this to the plugin section.|
|15-11-05 03:18||jvarrone||New Issue|
|15-11-05 03:21||jvarrone||Note Added: 0008651|
|19-12-05 13:37||michiel||Relationship added||related to 0003721|
||Status||new => confirmed|
|20-05-06 18:08||michiel||Note Added: 0013843|
|04-10-06 17:03||michiel||Status||confirmed => new|
|04-10-06 17:17||michiel||Status||new => resolved|
|04-10-06 17:17||michiel||Fixed in Version||=> 2.10.3|
|04-10-06 17:17||michiel||Resolution||open => fixed|
|04-10-06 17:17||michiel||Note Added: 0019570|
||Target Version||=> 2.10.6|
|02-03-08 20:57||h2b2||Note Added: 0041958|
|02-03-08 20:57||h2b2||Status||resolved => feedback|
|29-04-10 05:00||h2b2||Relationship added||related to 0012206|
|16-09-11 13:50||jvarrone||Note Added: 0051400|
|16-09-11 13:50||jvarrone||Status||feedback => assigned|
|16-09-11 13:52||jvarrone||Note Added: 0051401|
|05-06-13 21:34||michiel||Note Added: 0052101|
|05-06-13 21:35||michiel||Project||phpList 3 application => phpList 3 plugins|
|05-06-13 21:35||michiel||Category||Message Send Process => General|