Dependency Graph View Issue Relation Graph Vertical
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
13881Bug reports[All Projects] Expression Managerpublic2019-07-24 11:15
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.13.x 
Target VersionFixed in Version 
Summary13881: EM : Not number question replace . by , (javascript)
Description

When entering 1.1 in a short text question : if show the value inside same page : 1,1. In another page 1.1 (in french and other , for separator)

Steps To Reproduce

Import included survey and test

I test wth text.NAOK, text.shown

Additional Information

The biggest issue i think : the value shown is different in js and php. This must be same value shown in php and js.

The best solution can be :

  • NEVER update Text.NAOK and Text.shown
  • don't update Numeric.shown
  • update Numeric.shown according to numberformat

2.6lts + 2.73 have same issue

To know if value is a number : we have it in

  1. LEMvarNameAttr (onlynum) (js)
  2. ExpressionManager->RDP_TokenType : https://github.com/LimeSurvey/LimeSurvey/blob/bf35ce1bb2d5ac3b6a1bb0513f6033c4f7987de5/application/helpers/expressions/em_core_helper.php#L138 used here https://github.com/LimeSurvey/LimeSurvey/blob/bf35ce1bb2d5ac3b6a1bb0513f6033c4f7987de5/application/helpers/expressions/em_core_helper.php#L285 for example.
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.13.2 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Activities

DenisChenu

DenisChenu

2018-07-18 10:11

developer  

limesurvey_survey_numberNotNumber.lss (13,508 bytes)
DenisChenu

DenisChenu

2018-07-18 10:12

developer  

DenisChenu

DenisChenu

2018-07-18 10:22

developer   ~48527

Another things : using str_replace(",",".",Text.NAOK) didn't work … when EM have it it's . , then need str_replace("."," ",Text.NAOK) to remove the , . No way to see 1.1 …

DenisChenu

DenisChenu

2018-08-01 19:05

developer   ~48645

Issue is here: https://github.com/LimeSurvey/LimeSurvey/commit/49aff574e363cf659e79101b16f59d839427755f

Replacement Action is done even if attr.onlynum = 0

This must be done here : https://github.com/LimeSurvey/LimeSurvey/blob/108cf3522890408673977783c9bce8564fdfe189/assets/scripts/expressions/em_javascript.js#L754
(and maybe for shown too)

ollehar

ollehar

2019-07-24 11:01

administrator   ~52979

Feel free to give me an lss file later so I can make a unit test.

DenisChenu

DenisChenu

2019-07-24 11:13

developer   ~52980

@ollehar : i can do :)

I already have https://bugs.limesurvey.org/view.php?id=15012 and https://bugs.limesurvey.org/view.php?id=14995 to do … but hope i found one day to do it both …

DenisChenu

DenisChenu

2019-07-24 11:15

developer   ~52981

Oups :) think it's the another bug …

This one update API (even if it's a broken API) unsure we can do it for 3.X

Issue History

Date Modified Username Field Change
2018-07-18 10:11 DenisChenu New Issue
2018-07-18 10:11 DenisChenu File Added: limesurvey_survey_numberNotNumber.lss
2018-07-18 10:12 DenisChenu File Added: Capture du 2018-07-18 10-11-36.png
2018-07-18 10:12 DenisChenu File Added: Capture du 2018-07-18 10-11-45.png
2018-07-18 10:22 DenisChenu Note Added: 48527
2018-07-18 10:24 DenisChenu Additional Information Updated View Revisions
2018-08-01 19:02 DenisChenu Assigned To => markusfluer
2018-08-01 19:02 DenisChenu Status new => assigned
2018-08-01 19:05 DenisChenu Note Added: 48645
2019-07-24 00:37 DenisChenu Relationship added related to 15060
2019-07-24 00:39 DenisChenu Assigned To markusfluer => DenisChenu
2019-07-24 11:01 ollehar Note Added: 52979
2019-07-24 11:13 DenisChenu Note Added: 52980
2019-07-24 11:15 DenisChenu Note Added: 52981