View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16175 | Bug reports | Other | public | 2020-04-23 10:50 | 2020-12-30 19:27 |
Reporter | Jmantysalo | Assigned To | DenisChenu | ||
Priority | none | Severity | tweak | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.1.16 | ||||
Fixed in Version | 4.2.2 | ||||
Summary | 16175: statCountIf returns nothing for first participant | ||||
Description | statCountIf(...) returns zero, if there is at least one response already, and none of the responses match the condition. However for the first participant it returns nothing. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | Versio 4.1.17+200414 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | N/A | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | N/A | ||||
… PHP function return 0 … WTF |
|
Issue in https://github.com/LimeSurvey/LimeSurvey/commit/a83531f716f4584272dc3aaf5d214880c6579de4
|
|
https://github.com/LimeSurvey/LimeSurvey/pull/1409 Can someone check if return null or 0 or "" can broke something in JS ? My opinion : no … only NAN can broke something |
|
Can @Jmantysalo test this, please? I don't have time. |
|
@ollehar : it's not this issue, I update something done before, but don't know why … This issue is fixed with my fix, but touch to Expression core … |
|
I tested, this works. |
|
@cdorin : i know it's the good fix, but i update a line by Markus. If some of other dev have an idea : tell me. Else : i merge it tomorrow. |
|
Thanks @JHoeck to review :) Do you know what (false) value can broke JS ? empty array maybe ? But if a function return an array : i can be an error to use it in JS like this. My opinion on this fix : only Else : alternative option
I don't like to add a test if it's not needed |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=29957 |
|
fixed in 4.4.0 rc1 |
|
LimeSurvey: master 15477d8b 2020-05-04 13:42 Committer: GitHub Details Diff |
Fixed issue 16175: statCountIf returns nothing for first participant Dev: $result = $result ? $result : false; can never return 0 Dev: php function can return null, false, 0 "" … Dev: Add test for "0" to be returned |
Affected Issues 16175 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - tests/data/surveys/survey_archive_statCountFunctionsTest.lsa | Diff File | ||
mod - tests/functional/acceptance/15246-fixed-em-function/FixedFunctionExpressionPluginTest.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-23 10:50 | Jmantysalo | New Issue | |
2020-04-23 10:50 | Jmantysalo | File Added: limesurvey_survey_585752.lss | |
2020-04-23 10:58 | ollehar | Assigned To | => DenisChenu |
2020-04-23 10:58 | ollehar | Status | new => assigned |
2020-04-23 11:09 | DenisChenu | Note Added: 57334 | |
2020-04-23 11:38 | DenisChenu | Note Added: 57335 | |
2020-04-23 11:54 | DenisChenu | Assigned To | DenisChenu => ollehar |
2020-04-23 11:54 | DenisChenu | Status | assigned => ready for testing |
2020-04-23 11:54 | DenisChenu | Note Added: 57337 | |
2020-04-23 13:00 | ollehar | Note Added: 57339 | |
2020-04-23 13:00 | ollehar | Assigned To | ollehar => |
2020-04-23 13:05 | DenisChenu | Note Added: 57340 | |
2020-04-23 15:29 | Jmantysalo | Note Added: 57341 | |
2020-04-23 15:43 | DenisChenu | Assigned To | => cdorin |
2020-04-23 15:44 | DenisChenu | Note Added: 57342 | |
2020-04-23 16:51 | JHoeck | Assigned To | cdorin => JHoeck |
2020-04-24 09:39 | DenisChenu | Note Added: 57352 | |
2020-05-04 11:48 | DenisChenu | Changeset attached | => LimeSurvey master 15477d8b |
2020-05-04 11:48 | DenisChenu | Note Added: 57521 | |
2020-05-04 11:48 | DenisChenu | Assigned To | JHoeck => DenisChenu |
2020-05-04 11:48 | DenisChenu | Resolution | open => fixed |
2020-05-07 16:20 | DenisChenu | Status | ready for testing => resolved |
2020-05-07 16:20 | DenisChenu | Fixed in Version | => 4.2.2 |
2020-12-30 19:27 | cdorin | Note Added: 61357 | |
2020-12-30 19:27 | cdorin | Status | resolved => closed |