View Issue Details

IDProjectCategoryView StatusLast Update
09648Bug reports[All Projects] Survey takingpublic2018-08-08 06:41
ReportertimisAssigned Toaesteban 
PrioritylowSeveritymajor 
Status closedResolutionfixed 
Product Version2.05+ 
Target VersionFixed in Version 
Summary09648: Multiple numerical input displays 10 zeroes after the decimal place
Description

10 Zeroes are showed by multiple numerical Input fields that have integers entered (in the answer table and in the confirmation email that is sent to the user)

Steps To Reproduce

If "5345" is entered in a multiple numerical Input field, in the answer table is showed "5345.0000000000)

TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 2.05+ Build 150211
I will donate to the project if issue is resolvedNo
BrowserIE11
Database & DB-Version MySQL 5.5.31-0.7.10
Server OS (if known)SLES 11 SP3 (x86_64)
Webserver software & version (if known)Apache 2.2.12-1.42.1
PHP VersionPHP 5.3.17-0.13.7

Activities

timis

timis

2015-05-26 14:01

reporter  

survey_archive_539369.lsa (37,525 bytes)
aesteban

aesteban

2015-05-30 00:19

developer   ~32266

You can configure numeric answer as integer only (see advanced options). This way, there will be no zeros in answer table.

timis

timis

2015-06-01 14:10

reporter   ~32278

There is a validation rule in place so that only integers can be entered: /^[0-9]{1,9}$/
It still doesn't function. In the answer table there are always the 10 zeroes displayed.

aesteban

aesteban

2015-06-01 17:52

developer   ~32284

Please, don't use a explicit validation, there is already an option. Set "integer only" in advanced options and try again. When saving numeric values, zeros are removed if this option is set.

DenisChenu

DenisChenu

2015-06-02 08:40

developer   ~32285

Hi, did {QQ.NAOK} shown the final 0 in the survey ?

timis

timis

2016-02-12 09:48

reporter  

LIme multiple numerical values.png (227,892 bytes)
timis

timis

2016-02-12 09:50

reporter   ~34978

I am sorry, i cannot find it, i attached at file with the Options that i have in my Lime Version for Multiple Numerical Value. Please let me know which field it is and the condition i should set.

Many thanks,

C.

aesteban

aesteban

2016-06-07 17:31

developer   ~39302

From this commit:

https://github.com/LimeSurvey/LimeSurvey/commit/c2d6b92310223fc461f50ca78a8fd8bb128a9f95

"Integer only" option exists for multiple numerical inputs too.

timis

timis

2016-06-08 08:22

reporter   ~39307

Sorry, i dont know why this issue was closed, i don't have an answer yet :-(

aesteban

aesteban

2016-06-08 18:36

developer   ~39331

In your question, set "Advanced options -> Integer only". This way, no zeros are shown in the response table. You don't need a particular validation.

DeveloperChris

DeveloperChris

2018-08-08 06:41

reporter   ~48750

This is still an issue in Version 2.64.7+170404

When using EM the output is displayed as decimal regardless of the input type being integer or not eg {count.shown} is 9.0000000000 it should just be 9

The odd thing is when you first do a survey EM displays it correctly.

If you return to the same survey to make updates it is then displayed incorrectly

The workaround is to use sprintf e.g. {sprintf("%d", ProfileWordCount.shown)}

Issue History

Date Modified Username Field Change
2015-05-26 14:01 timis New Issue
2015-05-26 14:01 timis File Added: survey_archive_539369.lsa
2015-05-30 00:19 aesteban Note Added: 32266
2015-05-30 00:19 aesteban Assigned To => aesteban
2015-05-30 00:19 aesteban Status new => feedback
2015-06-01 14:10 timis Note Added: 32278
2015-06-01 14:10 timis Status feedback => assigned
2015-06-01 17:52 aesteban Note Added: 32284
2015-06-01 17:52 aesteban Status assigned => feedback
2015-06-02 08:40 DenisChenu Note Added: 32285
2016-01-08 17:48 DenisChenu Relationship added related to 10211
2016-01-08 17:49 DenisChenu Relationship deleted related to 10211
2016-02-12 09:48 timis File Added: LIme multiple numerical values.png
2016-02-12 09:50 timis Note Added: 34978
2016-02-12 09:50 timis Status feedback => assigned
2016-06-07 13:18 LouisGac Priority high => low
2016-06-07 17:31 aesteban Note Added: 39302
2016-06-07 17:31 aesteban Status assigned => resolved
2016-06-07 17:31 aesteban Resolution open => fixed
2016-06-07 17:31 aesteban Status resolved => closed
2016-06-08 08:22 timis Note Added: 39307
2016-06-08 08:22 timis Status closed => feedback
2016-06-08 08:22 timis Resolution fixed => reopened
2016-06-08 18:36 aesteban Note Added: 39331
2016-06-08 18:36 aesteban Status feedback => closed
2016-06-08 18:36 aesteban Resolution reopened => fixed
2018-08-08 06:41 DeveloperChris Note Added: 48750