View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
10001Bug reportsSurvey editingpublic2015-12-04 15:13
Reporterjosedevega Assigned ToDenisChenu  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary10001: Relevance equation evaluation not working with decimal values
Description

Relevance evaluation doesn´t work well in that particular case:

A) Assume Q1 is an array of number question with 1 or more subquestions, configured with "," as decimal separator

B) Assume Q2 is any other question with relevance equiation set to:
(( ! is_empty(Q1_SQ001.NAOK))) and 1

C) Q2 is visible when user introduces any integer value without decimals (like 10) in the 1st subquestion

D) Q2, wrongly, is not visible when user introduces any integer with decimals (like 10,1) in the 1st subquestion

I have added a text question (Q3) in order to show the {(( ! is_empty(Q1_SQ001.NAOK))) and 1} value and it is 1 in all cases (integer with or without decimals)

That is happening?

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)Versión 2.06+ Build 151018
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL5.5
Server OS (if known)Linux icpu3932 3.2.65-grsec-infong-14351 x86_64 GNU/Linux
Webserver software & version (if known)Apache
PHP VersionPHP Version 5.4.45

Users monitoring this issue

DenisChenu

Activities

josedevega

josedevega

2015-10-29 11:06

reporter   ~33463

Last edited: 2015-10-29 11:06

PD: this issue only occurs when Q2 is on a separate group, please check the attached .lss file
I have recreated the situation, T01 T02 and T03 are questions for testing relevance, same questions have been copied on Group 02, and here you could get the error

DenisChenu

DenisChenu

2015-11-02 17:39

developer   ~33490

Last edited: 2015-11-02 17:46

Confirm the issu : javascript used after the second group show is broken

INput hidden value is 1.6 : the js wait a 1,6. Don't know if we need to

  • fix EM PHP to return 1,6 in input
  • fix EM js LEMval for hidden var (the no , to . test)
  • fix EM js to update . to , before do other testing

Think better is ??? Maybe return always the real value : 1.2 , even if user write 1,2 (and allowed to write 1,2)

josedevega

josedevega

2015-11-05 23:55

reporter   ~33517

I think:
a) decimal values should have 2 values: internal value (1.6) and formatted value (1,6 or 1.6 depending decimal sep)
b) evaluations (ie relevance evaluations) should be done using internal value
c) input validations should be done using formatted value

So, I think the error is not the js in the second group, the error is that js should wait 1.6 in input for relevance evaluations in both groups, and js should wait 1,6 in input for input validations just in 1st group

Thanks a lot

DenisChenu

DenisChenu

2015-12-01 14:18

developer   ~33640

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

c_schmitz

c_schmitz

2015-12-04 15:13

administrator   ~33695

2.06+ Build 151205 released

Related Changesets

LimeSurvey: master 4d80388e

2015-11-09 10:12:15

DenisChenu

Details Diff
Fixed issue 10001: Relevance equation on different group not working with decimal values
Dev: quick fix in JS, must be done in PHP only of different group in EM
Affected Issues
10001
mod - scripts/expressions/em_javascript.js Diff File

LimeSurvey: master 7c850970

2015-12-01 13:18:09

DenisChenu

Details Diff
Merge pull request #382 from Shnoulle/master_fix-10001

Fixed issue 10001: Relevance equation on different group not working…
Affected Issues
10001
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2015-10-28 15:57 josedevega New Issue
2015-10-29 11:06 josedevega Note Added: 33463
2015-10-29 11:06 josedevega File Added: limesurvey_survey_324677.lss
2015-10-29 11:06 josedevega Note Edited: 33463
2015-10-30 13:10 DenisChenu Issue Monitored: DenisChenu
2015-11-02 17:39 DenisChenu Note Added: 33490
2015-11-02 17:40 DenisChenu Note Edited: 33490
2015-11-02 17:46 DenisChenu Note Edited: 33490
2015-11-05 23:55 josedevega Note Added: 33517
2015-11-07 01:34 DenisChenu Assigned To => DenisChenu
2015-11-07 01:34 DenisChenu Status new => assigned
2015-12-01 14:18 DenisChenu Changeset attached => LimeSurvey master 4d80388e
2015-12-01 14:18 DenisChenu Changeset attached => LimeSurvey master 7c850970
2015-12-01 14:18 DenisChenu Note Added: 33640
2015-12-01 14:18 DenisChenu Resolution open => fixed
2015-12-03 10:18 DenisChenu Status assigned => resolved
2015-12-03 10:18 DenisChenu Fixed in Version => 2.06+
2015-12-04 15:13 c_schmitz Note Added: 33695
2015-12-04 15:13 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing
2021-08-03 16:48 guest Bug heat 6 => 8