View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
09241Bug reportsExpression Managerpublic2015-05-08 09:16
ReporterDenisChenu Assigned Togabrieljenik  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary09241: Behaviour of numeric question type (and multi numeric)
Description

multi numeric and numeric question type seems OK with invalid DECIMAL

Steps To Reproduce

Add a multi numeric question and set max chars at more tha 30
Activate survey : test and enter some numeric with more than 30 characters and use it in EM.
IN DB : 9999999999999999999.9999999999

Additional Information

Maybe we need is_decimal to numeric question type.
We need to fix 02000 + 1 to in PHP/javascript

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)140922
I will donate to the project if issue is resolvedNo
BrowserFF32
Database type & versionMysql 5
Server OS (if known)debian/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.4.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2014-11-26 20:31

manager   ~31116

I will review this!.

DenisChenu

DenisChenu

2014-11-27 08:14

developer   ~31121

@gabrieljenik : it's a conceptual issue, we have to make choice :)

gabrieljenik

gabrieljenik

2014-12-02 12:41

manager   ~31141

OK, I release this then... I shall assign it to you?

DenisChenu

DenisChenu

2014-12-02 14:51

developer   ~31142

Last edited: 2014-12-02 14:51

Hi, Can not be in dev meeting today. But i don't know if we fix ir or not. If you have another idea ? It can be really great !

PS: 2.06, not 2.05

DenisChenu

DenisChenu

2014-12-02 15:02

developer   ~31144

@gabrieljenik : sorry : take it, i made an error on bug number ... We need to fix it :)

gabrieljenik

gabrieljenik

2014-12-16 23:13

manager   ~31279

OK, I got the issue.

What if we add some rules to the JS in order for not to store numbers with more than 20 characters before the decimal separator and no more than 10 after the decimal separator?

On the other hand,

  • add a validation for not lettning admins setting max characters larger than 30 for numerical inputs?
  • add a warning in the manual?

An issue could arise if the value is generated as a calculation from an equation question. I don't know what we can do in those situations. If the number to be stored has more than 20 characters before the decimal point, we are not going to be able to store that number in the DB. We have reached the limit. How shall we handle it?

DenisChenu

DenisChenu

2014-12-17 08:18

developer   ~31281

A JS solution is not the only ne to do. But it's a good starting point

Fixing 2.05 in survey-runtime : https://github.com/LimeSurvey/LimeSurvey/blob/master/scripts/survey_runtime.js#L173 seems OK for me.

gabrieljenik

gabrieljenik

2015-01-12 22:32

manager   ~31457

Not sure if this is going to be enough...

Master >> https://github.com/LimeSurvey/LimeSurvey/pull/268
v2.06 >> https://github.com/LimeSurvey/LimeSurvey/pull/269

Let me know what you think. This issue is not pulling out as easy as other fixes. :)

Shall I

  • add a validation for not letting admins setting max characters larger than 30 for numerical inputs?
  • add a warning in the manual?
DenisChenu

DenisChenu

2015-01-13 08:15

developer   ~31458

Seems OK for me, a war,ig in manual is OK too.
max characters < 31 (with the dot) can be done only in 2.1, when we move Question advanced settings in SettingsWidget i think (same for max value and min value)

gabrieljenik

gabrieljenik

2015-01-13 13:41

manager   ~31460

The beaviour when setting "numbers_only = T" for equation question types would be included the fix I made? I believe the JS function is not called for equation question types.

What do you think?

DenisChenu

DenisChenu

2015-01-21 14:25

developer   ~31480

@gabiel : not the same : Equation question type are allways text in DB :).

DenisChenu

DenisChenu

2015-03-07 17:07

developer   ~31795

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

DenisChenu

DenisChenu

2015-03-07 17:08

developer   ~31796

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

DenisChenu

DenisChenu

2015-03-07 17:09

developer   ~31797

Actually resolved for bug. But think we need rework on EM too (use new is_decimal function ? What for short_text/only number ? etc ...)

c_schmitz

c_schmitz

2015-05-08 09:16

administrator   ~32126

2.05+ Build 150508 released

Related Changesets

LimeSurvey: master c0d86d2e

2015-01-12 21:04:38

gabrieljenik

Details Diff
Fixed Issue 09241: Behaviour of numeric question type (and multi numeric)

Dev Before sent to EM, treat numbers larger than 20 characters before decimal part or 10 after decimal part.
Affected Issues
09241
mod - scripts/survey_runtime.js Diff File

LimeSurvey: 2.06 2e039e15

2015-01-12 21:20:13

gabrieljenik

Details Diff
Fixed Issue 09241: Behaviour of numeric question type (and multi numeric...)

Dev Before sent to EM, treat numbers larger than 20 characters before decimal part or 10 after decimal part.
Affected Issues
09241
mod - scripts/survey_runtime.js Diff File

LimeSurvey: master 10d043ba

2015-01-12 21:20:58

gabrieljenik

Details Diff
Fixed Issue 09241: Behaviour of numeric question type (and multi numeric)

Dev Before sent to EM, treat numbers larger than 20 characters before decimal part or 10 after decimal part.
Affected Issues
09241
mod - scripts/survey_runtime.js Diff File

LimeSurvey: master e2859cf1

2015-01-12 21:22:20

gabrieljenik

Details Diff
Fixed Issue 09241: Behaviour of numeric question type (and multi numeric)

Dev Remove console.log command
Affected Issues
09241
mod - scripts/survey_runtime.js Diff File

LimeSurvey: 2.06 2b8c7f54

2015-03-07 16:06:52

DenisChenu

Details Diff
Merge pull request #269 from gabrieljenik/patch-1

Fixed Issue 09241: Behaviour of numeric question type (and multi numeric)
Affected Issues
09241
mod - scripts/survey_runtime.js Diff File

LimeSurvey: master ec5cea0a

2015-03-07 16:07:37

DenisChenu

Details Diff
Merge pull request #268 from gabrieljenik/Issue_09241

Fixed Issue 09241: Behaviour of numeric question type (and multi numeric...)
Affected Issues
09241
mod - scripts/survey_runtime.js Diff File

Issue History

Date Modified Username Field Change
2014-09-22 18:31 DenisChenu New Issue
2014-09-22 18:36 DenisChenu File Added: survey_archive_bad_decimal.lsa
2014-11-26 20:31 gabrieljenik Note Added: 31116
2014-11-26 20:32 gabrieljenik Assigned To => gabrieljenik
2014-11-26 20:32 gabrieljenik Status new => assigned
2014-11-27 08:14 DenisChenu Note Added: 31121
2014-12-02 12:41 gabrieljenik Note Added: 31141
2014-12-02 14:51 DenisChenu Note Added: 31142
2014-12-02 14:51 DenisChenu Note Edited: 31142
2014-12-02 15:02 DenisChenu Note Added: 31144
2014-12-16 23:13 gabrieljenik Note Added: 31279
2014-12-17 08:18 DenisChenu Note Added: 31281
2015-01-12 22:32 gabrieljenik Note Added: 31457
2015-01-13 08:15 DenisChenu Note Added: 31458
2015-01-13 13:41 gabrieljenik Note Added: 31460
2015-01-21 14:25 DenisChenu Note Added: 31480
2015-03-07 17:07 gabrieljenik Changeset attached => LimeSurvey 2.06 2e039e15
2015-03-07 17:07 DenisChenu Changeset attached => LimeSurvey 2.06 2b8c7f54
2015-03-07 17:07 DenisChenu Note Added: 31795
2015-03-07 17:07 DenisChenu Assigned To gabrieljenik => DenisChenu
2015-03-07 17:07 DenisChenu Resolution open => fixed
2015-03-07 17:08 gabrieljenik Changeset attached => LimeSurvey master c0d86d2e
2015-03-07 17:08 gabrieljenik Changeset attached => LimeSurvey master 10d043ba
2015-03-07 17:08 gabrieljenik Changeset attached => LimeSurvey master e2859cf1
2015-03-07 17:08 DenisChenu Changeset attached => LimeSurvey master ec5cea0a
2015-03-07 17:08 DenisChenu Note Added: 31796
2015-03-07 17:08 DenisChenu Assigned To DenisChenu => gabrieljenik
2015-03-07 17:09 DenisChenu Note Added: 31797
2015-03-07 17:09 DenisChenu Status assigned => resolved
2015-03-07 17:09 DenisChenu Fixed in Version => 2.05+
2015-05-08 09:16 c_schmitz Note Added: 32126
2015-05-08 09:16 c_schmitz Status resolved => closed