- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Numerical input strips zeros
- jussibus
- Topic Author
- Offline
- New Member
Less
More
11 years 4 months ago #89209
by jussibus
Numerical input strips zeros was created by jussibus
Hello!
I have a problem with LimeSurvey Version 2.00+ Build 121127.
I have a numerical input field in a survey. If I input, for example, '1000' to the field and submit the survey, the db table has '1000.0000000000' but the 'Responses and statistics' in the LimeSurvey admin shows only '1'. I noticed that the the trailing zeros are always stripped when viewing the responses in 'Responses and statistics'.
Is this a bug or did I do something wrong?
Thanks, Jussi
I have a problem with LimeSurvey Version 2.00+ Build 121127.
I have a numerical input field in a survey. If I input, for example, '1000' to the field and submit the survey, the db table has '1000.0000000000' but the 'Responses and statistics' in the LimeSurvey admin shows only '1'. I noticed that the the trailing zeros are always stripped when viewing the responses in 'Responses and statistics'.
Is this a bug or did I do something wrong?
Thanks, Jussi
The topic has been locked.
- mfs01
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 years 4 months ago #89213
by mfs01
Replied by mfs01 on topic Aw: Numerical input strips zeros
On a related note: In my current survey (correctly: a census), I have mandatory 14x7 matrix of numeric fields. When I enter a perfectly valid zero(0) value, this zero will be deleted when I return from a later question group, and therefore this question will be marked as unanswered due to the empty value. Is this a bug or did I miss something?
Using Version 2.00+ Build 121115
Using Version 2.00+ Build 121115
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
11 years 4 months ago #89216
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Numerical input strips zeros
jussibus, this is a bug.
Please file a bug report and...
1. Give as much information as possible.
2. Provide step-by-step instructions how to reproduce the problem.
3. Provide screenshots and a sample survey.
4. Post the link to the bug here so we can follow the progress.
mfs, I would wait for the resolution of the bug and retest.
Please file a bug report and...
1. Give as much information as possible.
2. Provide step-by-step instructions how to reproduce the problem.
3. Provide screenshots and a sample survey.
4. Post the link to the bug here so we can follow the progress.
mfs, I would wait for the resolution of the bug and retest.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- mfs01
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 years 4 months ago - 11 years 4 months ago #89223
by mfs01
Replied by mfs01 on topic Aw: Numerical input strips zeros
Just found this in the tracker for a recently fixed bug (06859: Integer values displayed as floiting point numbers):
Of course, trailing zeroes may be removed ONLY if they come AFTER the decimal sign!
This might be the cause for the bug reported by jussibus (not yet in the tracker).
Seems like the culprit is the indiscrimating rtrim() here in application/helpers/common_helper.php
LimeSurvey: master be6e85bc
Timestamp: 2012-11-20 09:25:21
Author: Shnoulle
Committer: Denis Chenu
Dev: remove all ending 0 to numeric question type, and remove the . if it's at ending
Of course, trailing zeroes may be removed ONLY if they come AFTER the decimal sign!
This might be the cause for the bug reported by jussibus (not yet in the tracker).
Seems like the culprit is the indiscrimating rtrim() here in application/helpers/common_helper.php
Last edit: 11 years 4 months ago by mfs01.
The topic has been locked.
- jussibus
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
11 years 3 months ago #89287
by jussibus
Replied by jussibus on topic Aw: Numerical input strips zeros
A bug report filed:
bugs.limesurvey.org/view.php?id=6980
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 3 months ago #89321
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Aw: Numerical input strips zeros
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- jussibus
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
11 years 3 months ago #89322
by jussibus
Replied by jussibus on topic Aw: Numerical input strips zeros
Thank you!
The topic has been locked.
- mfs01
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 years 3 months ago - 11 years 3 months ago #89415
by mfs01
Replied by mfs01 on topic Aw: Numerical input strips zeros
I installed the fixes for issue
#6980
by copying the changed source files over the existing ones, then restarting the web server, clearing caches and the like. No change for my case of zeroes vanishing from numeric arrays. Filed a report, issue
#6997
, complete with survey to reproduce the error.
I hope someone can help, I need a fix really urgent. But sorry, I cannot donate, I am working in a governmental entity, and *donating* is a real pita.
I hope someone can help, I need a fix really urgent. But sorry, I cannot donate, I am working in a governmental entity, and *donating* is a real pita.
Last edit: 11 years 3 months ago by mfs01. Reason: Added links to the issue numbers
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 3 months ago #89418
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Aw: Numerical input strips zeros
Oups,
It's for Array number.
Give it a try
It's for Array number.
Give it a try
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 3 months ago - 11 years 3 months ago #89432
by DenisChenu
You can contact Carsten directly to see what is possible.
Denis
PS: and you can do little personnal donation
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Aw: Numerical input strips zeros
Think LimeSurvey accept governmental donation.mfs wrote: But sorry, I cannot donate, I am working in a governmental entity, and *donating* is a real pita.
You can contact Carsten directly to see what is possible.
Denis
PS: and you can do little personnal donation
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 11 years 3 months ago by DenisChenu.
The topic has been locked.