Hi, I'm not sure if anybody agrees this is a bug.
Anyway, according to me, when we filter the report by using an "is empty" filter type (ftype: 7) we don't get the correct results when private fields are used are used inside the webform.
I've a case of a webform with a private field "Approve request" which is not shown to users filling the webform and therefore the value of this component is not saved in the database.
Function _webform_report_test_filters(...) in webform_report.inc checks whether the cid is in data.
In case not (data does not exist) it is not filtered except when filter type is 0.
I would amend this by changing code at line 1125 like this:
// data does not exist and not filtered
else {
if ($filter['ftype'] == 0 || // None
$filter['ftype'] == 7) { // Is empty
// pass it
$ok = TRUE;
}
}
If you agree on this I would kindly ask the maintainer of this nice module to patch the code as shown above.
Let me know what you think about it.
Best regards
Comments
Comment #1
TBarina CreditAttribution: TBarina commentedComment #2
Vako CreditAttribution: Vako commentedThank you. I hope your code will be accepted and implemented in the next release.
Comment #3
jimbullington CreditAttribution: jimbullington commentedI'm not sure I know what you mean by private field.
Comment #4
TBarina CreditAttribution: TBarina commentedHi, sorry for the delay in answering you.
By private field I mean a webform component flagged as Private in it's Display settings (i.e.: shown only to users with Results Access).
Thanks in advance
Bye
Comment #5
TBarina CreditAttribution: TBarina commented