View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
11772Bug reportsExpression Managerpublic2016-10-14 10:24
Reportermdekker Assigned Toollehar  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.54 
Summary11772: Expression manager convert_value does not obey strict setting
Description

Documentation says the convert_value function has a parameter that tells if the lookup should be strict of not:
/**

  • Find the closest matching numerical input values in a list an replace it by the
  • corresponding value within another list
  • @author Johannes Weberhofer, 2013
  • @param numeric $fValueToReplace
  • @param numeric $iStrict - 1 for exact matches only otherwise interpolation the
  • closest value should be returned
  • @param string $sTranslateFromList - comma seperated list of numeric values to translate from
  • @param string $sTranslateToList - comma seperated list of numeric values to translate to
  • @return numeric
    */

This seems to work ok for javascript (in page) evaluation, but not for backend evaluation.

Steps To Reproduce

Import attached survey to see the problem.

I will supply a pull request for both 2.06lts and master branch

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)2.06lts 160524
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql
Server OS (if known)windows
Webserver software & version (if known)chrome
PHP Version5.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

mdekker

mdekker

2016-10-11 15:17

reporter   ~41229

https://github.com/LimeSurvey/LimeSurvey/pull/557

Please apply to 2.06lts branch too

ollehar

ollehar

2016-10-12 15:18

administrator   ~41271

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

ollehar

ollehar

2016-10-12 15:28

administrator   ~41273

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

c_schmitz

c_schmitz

2016-10-14 10:24

administrator   ~41334

Version 2.54.3 Build 161014 released

Related Changesets

LimeSurvey: master a919ee72

2016-10-12 15:13:20

ollehar

Details Diff
Fixed issue 11772: Expression manager convert_value does not obey strict setting Affected Issues
11772
mod - application/helpers/expressions/em_core_helper.php Diff File
mod - scripts/expressions/em_javascript.js Diff File

LimeSurvey: 2.06lts 60338d84

2016-10-12 15:18:29

ollehar

Details Diff
Fixed issue 11772: Expression manager convert_value does not obey strict setting Affected Issues
11772
mod - application/helpers/expressions/em_core_helper.php Diff File
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2016-10-11 14:56 mdekker New Issue
2016-10-11 15:03 mdekker File Added: limesurvey_survey_424229.lss
2016-10-11 15:17 mdekker Note Added: 41229
2016-10-12 14:39 ollehar Assigned To => ollehar
2016-10-12 14:39 ollehar Status new => assigned
2016-10-12 15:18 ollehar Changeset attached => LimeSurvey master a919ee72
2016-10-12 15:18 ollehar Note Added: 41271
2016-10-12 15:18 ollehar Resolution open => fixed
2016-10-12 15:20 ollehar Status assigned => resolved
2016-10-12 15:20 ollehar Fixed in Version => 2.54
2016-10-12 15:28 ollehar Changeset attached => LimeSurvey 2.06lts 60338d84
2016-10-12 15:28 ollehar Note Added: 41273
2016-10-14 10:24 c_schmitz Note Added: 41334
2016-10-14 10:24 c_schmitz Status resolved => closed