View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 09602 | Bug reports | Expression Manager | public | 2015-04-14 14:28 | 2015-04-15 14:57 |
| Reporter | cr80 | Assigned To | DenisChenu | ||
| Priority | high | Severity | minor | ||
| Status | closed | Resolution | no change required | ||
| Product Version | 2.05+ | ||||
| Fixed in Version | 2.05+ | ||||
| Summary | 09602: REGEX - error on the use of regular expressions | ||||
| Description | Leading zeros are being ignored by Expression manager in numeric questions when the input value has more than one character. (I see the same with a short-text question set to "Numbers only") | ||||
| Steps To Reproduce | See the file zip ErrorREGEX.zip. Two example (phone number and SIRET). not right when the string begin with the number 0. Example : 0324568974 With number 1 to 9 is OK. Similarly for the number siret | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 4 | ||||
| Complete LimeSurvey version number (& build) | Version 2.05+ Build 150211 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | FireFox 36.0.4 | ||||
| Database type & version | MySQL 5.5.38 | ||||
| Server OS (if known) | Linux Debian 6 (Squeeze) | ||||
| Webserver software & version (if known) | Apache 2.2.* | ||||
| PHP Version | php 5.4.3 | ||||
| Git branch / Pull Request URL | |||||
|
If you put 567 it' saved 0000000567.00000 in database, 000 is more a text than a number, 000==0. Using TEXT question type is OK. I think it's a Not fix issue Assigned to Tony : https://www.limesurvey.org/en/forum/can-i-do-this-with-limesurvey/100039-expressions-r%C3%A9guli%C3%A8res |
|
|
0123 IS a number. |
|
|
Furthermore, "Using TEXT question type" is not okay. If you set a short-text to "Numbers only", the same problem appears. How can one limit a question to numerics and allow leading zeros? |
|
|
You can review the javascript : but there are a DB issue. You can use config too for JS : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/config/config-defaults.php#L623 But it's like Calc : Enter 0001 in a cell , enter : shown 1. If you want to save 06 : it's must be a text. With number : 06==6 ANd when we save a nulbre, we must save like a number. |
|
|
I disagree. If the character is allowed to be input, the data should reflect EXACTLY what was input. |
|
|
Then close it, because same in PHP: Look at : http://www.sondages.pro/brouillon/ Not a bug : a number don't have leading 0. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-04-14 14:28 | cr80 | New Issue | |
| 2015-04-14 14:28 | cr80 | File Added: ErrorREGEX.zip | |
| 2015-04-15 09:24 | DenisChenu | Note Added: 31998 | |
| 2015-04-15 09:26 | DenisChenu | Assigned To | => tpartner |
| 2015-04-15 09:26 | DenisChenu | Status | new => assigned |
| 2015-04-15 09:27 | DenisChenu | Note Edited: 31998 | |
| 2015-04-15 09:27 | DenisChenu | Note Edited: 31998 | |
| 2015-04-15 12:31 | tpartner | Note Added: 31999 | |
| 2015-04-15 12:31 | tpartner | Assigned To | tpartner => DenisChenu |
| 2015-04-15 12:35 | tpartner | Note Added: 32000 | |
| 2015-04-15 14:07 | DenisChenu | Note Added: 32001 | |
| 2015-04-15 14:08 | DenisChenu | Note Edited: 32001 | |
| 2015-04-15 14:17 | tpartner | Note Added: 32002 | |
| 2015-04-15 14:57 | DenisChenu | Note Added: 32003 | |
| 2015-04-15 14:57 | DenisChenu | Status | assigned => closed |
| 2015-04-15 14:57 | DenisChenu | Resolution | open => no change required |
| 2015-04-15 14:57 | DenisChenu | Fixed in Version | => 2.05+ |