View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
16878Bug reportsSurvey takingpublic2020-12-12 11:06
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.25.3 
Summary16878: Numeric question : Error with dot/comma are unclear
Description

When you set autocorrect numeric to no : error about , and . are unclear.

Steps To Reproduce

Import included survey
Lauch and test to enter 1,1.

Entering aaa is clear

Additional Information

Didn't test : but seems LEMradix is checked before the test with , in unecessary.

And again : why update string … a string must stay a string … https://github.com/LimeSurvey/LimeSurvey/blob/f479bc979dc74222b7175a24a1b28895c7145e5f/assets/scripts/expressions/em_javascript.js#L731
(see related issue)

TagsNo tags attached.
Attached Files
Peek 07-12-2020 17-45.gif (231,572 bytes)
Bug heat2
Complete LimeSurvey version number (& build)3.25.5
I will donate to the project if issue is resolvedNo
Browserfirefox
Database type & versionnot relevant?
Server OS (if known)not relevant ?
Webserver software & version (if known)not relevant ?
PHP Versionnot relevant ?

Relationships

related to 13881 new EM : Not number question replace . by , (javascript) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2020-12-08 10:31

developer   ~60859

function LEMis_numeric(mixed_var)
{
    var isNumericRegex = new RegExp(/^(-)?\d*(,|\.)?\d*$/);
    return ( ( ( typeof mixed_var === 'string' && isNumericRegex.test(mixed_var)) || typeof mixed_var === 'number') && mixed_var !== '' && !isNaN(mixed_var));
}

isNumericRegex must take LEMradix in account

DenisChenu

DenisChenu

2020-12-08 11:38

developer   ~60860

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 …

Issue History

Date Modified Username Field Change
2020-12-07 17:51 DenisChenu New Issue
2020-12-07 17:51 DenisChenu File Added: limesurvey_survey_numerci.lss
2020-12-07 17:51 DenisChenu File Added: Peek 07-12-2020 17-45.gif
2020-12-07 17:51 DenisChenu Relationship added related to 13881
2020-12-08 10:29 DenisChenu Assigned To => DenisChenu
2020-12-08 10:29 DenisChenu Status new => assigned
2020-12-08 10:31 DenisChenu Note Added: 60859
2020-12-08 11:37 DenisChenu Assigned To DenisChenu =>
2020-12-08 11:38 DenisChenu Status assigned => new
2020-12-08 11:38 DenisChenu Note Added: 60860
2020-12-12 11:06 DenisChenu Assigned To => DenisChenu
2020-12-12 11:06 DenisChenu Status new => assigned