View Issue Details

IDProjectCategoryView StatusLast Update
0004722phpList 3 plugins[All Projects] Generalpublic19-11-19 22:33
Reporterjvarrone 
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionfixed 
Summary0004722: Selection criteria problem with checkbox attribute.
DescriptionSelection 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 Information1) 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"
TagsNo tags attached.

Relationships

related to 0003721 closed phpList 3 application phplist 2.10.x 
related to 0012206 resolvedmichiel phpList 3 application incorrect import of checkboxgroup attributes 

Activities

jvarrone

15-11-05 03:21

reporter   ~0008651

Afterthought:

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).

michiel

20-05-06 18:08

administrator   ~0013843

Nick Lawson reported doing "UPDATE phplist_user_user_attribute SET value = '' WHERE value IS NULL;" which sorted it.

michiel

04-10-06 17:17

administrator   ~0019570

just tried and empty checkbox imports are now set to "off" in the DB

h2b2

02-03-08 20:57

reporter   ~0041958

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

Code:
 table1.attributeid = 6 and ( table1.value IS NULL)


it had something LIKE
Code:

table1.attributeid = 6 and ( table1.value = 0)


Point being is the "IS NULL" needs to be there.

**** END QUOTE****

jvarrone

16-09-11 13:50

reporter   ~0051400

Any progress on this bug?

jvarrone

16-09-11 13:52

reporter   ~0051401

sorry posted request for status update in error. can't figure out how to delete the note(s)

michiel

05-06-13 21:34

administrator   ~0052101

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.

Issue History

Date Modified Username Field Change
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
09-02-06 17:45 user1177 Status new => paused
20-05-06 18:08 michiel Note Added: 0013843
04-10-06 17:03 michiel Status paused => 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
18-02-08 14:05 user1822 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