Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
13881Bug reportsExpression Managerpublic2023-10-31 17:27
ReporterDenisChenu Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version3.13.x 
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.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)3.13.2 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 15060 closedDenisChenu Other option with number only erases decimal comma - with NO warning 
related to 16878 assignedDenisChenu Numeric question : Error with dot/comma are unclear 
related to 18527 closedollehar Can't validate phone number usign Regex if phone number starts with + 
related to 19212 new Fields validated by Regex appear red even though regex is correct 

Activities

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

DenisChenu

DenisChenu

2020-12-08 11:38

developer   ~60861

Shit … more complex than i think …

The issue is here :
https://github.com/LimeSurvey/LimeSurvey/commit/13e1b2ba8fd54e581e86df6176e8dc7aabf0d263
https://github.com/LimeSurvey/LimeSurvey/commit/b88dd45b0d3cc9454f1a0c23aea67253d7e44a45
etc …

But since there are no related mantis : why this is added is unknow …

DenisChenu

DenisChenu

2020-12-12 12:35

developer   ~60936

OK : EM core to fix …
https://github.com/LimeSurvey/LimeSurvey/blob/2808acfb0099ab1039695970d0a5d76794a15b7e/application/helpers/expressions/em_core_helper.php#L1399

Just … … don't set LEMRadix to ,

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
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
2020-12-07 17:51 DenisChenu Relationship added related to 16878
2020-12-08 11:38 DenisChenu Assigned To DenisChenu =>
2020-12-08 11:38 DenisChenu Status assigned => new
2020-12-08 11:38 DenisChenu Note Added: 60861
2020-12-12 11:06 DenisChenu Assigned To => DenisChenu
2020-12-12 11:06 DenisChenu Status new => assigned
2020-12-12 12:35 DenisChenu Note Added: 60936
2020-12-12 12:36 DenisChenu Assigned To DenisChenu =>
2020-12-12 12:36 DenisChenu Status assigned => new
2023-02-09 08:17 DenisChenu Relationship added related to 18527
2023-10-31 17:27 DenisChenu Relationship added related to 19212