View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
12107Bug reportsExpression Managerpublic2017-02-21 12:01
Reporterjelo Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.57.x 
Fixed in Version2.63.x 
Summary12107: sumifop concatenating values instead of sum them up.
Description

From stinem1 via forum:

Equation question with the following:
{sumifop(">", 0, B1.valueNAOK, B2.valueNAOK)}

If I select the answer for B1 that gives me a score of 1000, and the answer for B2 that gives me a score of 1000, I get:
"010001000" instead of the sum of the two scores, 2000.
It appears to be correctly selecting the answers I want, but instead of adding them as values, it is joining them into a string.

If I use {sum(B1.valueNAOK, B2.valueNAOK)}, it works just fine, but obviously isn't filtering for the scores greater than zero.

Additional Information

Consult thread for more infos and examples.
https://www.limesurvey.org/forum/design-issues/108283-sumifop-issue

E.g. tpartner: The JavaScript is seeing the values as strings instead of numbers, so concatenating them instead of adding them.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)2.57.1+161205
I will donate to the project if issue is resolvedNo
Browser
Database type & versionN/A
Server OS (if known)N/A
Webserver software & version (if known)N/A
PHP VersionN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2017-02-03 12:08

administrator   ~42944

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=22241

Related Changesets

LimeSurvey: master 1cef4184

2017-02-03 13:08

c_schmitz


Details Diff
Fixed issue 12107: Sumifop concatenating values instead of sum them up. Affected Issues
12107
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2017-02-02 13:43 jelo New Issue
2017-02-02 14:11 DenisChenu Issue Monitored: DenisChenu
2017-02-03 12:08 c_schmitz Assigned To => c_schmitz
2017-02-03 12:08 c_schmitz Status new => assigned
2017-02-03 12:08 c_schmitz Changeset attached => LimeSurvey master 1cef4184
2017-02-03 12:08 c_schmitz Note Added: 42944
2017-02-03 12:08 c_schmitz Resolution open => fixed
2017-02-03 12:09 c_schmitz Status assigned => resolved
2017-02-03 12:09 c_schmitz Fixed in Version => 2.62.x
2017-02-13 22:43 DenisChenu Issue End Monitor: DenisChenu
2017-02-21 12:01 c_schmitz Status resolved => closed
2017-02-21 12:01 c_schmitz Fixed in Version 2.62.x => 2.63.x