View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
15958Bug reportsConditionspublic2020-04-01 17:13
Reporterartasom Assigned Tocdorin  
PrioritynoneSeverityminor 
Status closedResolutionopen 
Product Version3.22.7 
Summary15958: Array question (text) cannot enforce it is an integer
Description

I create an array where for the user to input numbers but. I have tried to enforce the array to have only integer values. In the array I have enabled "only numbers" and in the subquestion validation I have added the following formula
is_empty(this) or is_int(this)
But non integer values are kept in the array as valid.

Steps To Reproduce
  1. Create array (text)
  2. Enable "only numbers"
  3. Add as subquestion validation the formula is_empty(this) or is_int(this)
  4. Input a decimal number
  5. It is not changed to an integer number
TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)Version 3.22.7+200225
I will donate to the project if issue is resolvedNo
Browser
Database type & version359
Server OS (if known)
Webserver software & version (if known)
PHP Version5.5.38

Users monitoring this issue

DenisChenu

Activities

artasom

artasom

2020-03-07 10:26

reporter   ~56359

When I first opened a thread in the forum, I indicated there that for me also the array numbers are not working. But for tpartner seem to work
https://www.limesurvey.org/forum/design-issues/120473-array-question-both-text-and-number-cannot-enforce-it-is-an-integer
I also stated that for me the even if the number was corrected, as tpartner showed, I would have expected the correction to be an integer, not to a decimal value with the decimal part as 0.

DenisChenu

DenisChenu

2020-03-09 08:15

developer   ~56361

I can not reproduce on my part ...

  1. Without tips : right : you enter invalid data , nothing is show but you can not sumbit
  2. With tips : right tips are shown .

The maine issue are maybe "No tips : no error shown", but it's really a lesser issue

cdorin

cdorin

2020-03-16 18:36

reporter   ~56577

Hello @artasom, could you please confirm the behaviour?

artasom

artasom

2020-03-19 07:50

reporter   ~56656

Hi. Apologies for my late reply.

Unless there is another setting for tips, the one in the question about "Hide tips" is off, so they should be shown, right? If there is any other place where I should enable it, please let me know to test it. Otherwise, I do not see any error when I input decimal values but, indeed, I cannot submit the answers because a message is then displayed indicating there are errors in the question. Also, I was expecting to get the same behaviour than with "Numerical Input" questions with the "Integer only" option activated, that the values got autocorrected.

I am bit lost because with the same LSS file it seems that me, @DenisChenu and @tpartner are getting different behaviours... I've tried reviewing the general settings to try to find something that supersedes the survey's setting that could be different in my instance, but I can't find it.

Thank you for your support.

DenisChenu

DenisChenu

2020-03-19 08:59

developer   ~56657

The issue is more : if there are no «Subquestion validation tip» then when try to submit : no error are shown.

See the screenshot

DenisChenu

DenisChenu

2020-03-19 09:03

developer   ~56659

Sample lss fixed.

artasom

artasom

2020-04-01 07:55

reporter   ~56860

Then this is an intended behaviour I suppose, right?

DenisChenu

DenisChenu

2020-04-01 08:45

developer   ~56861

You mean

It is not changed to an integer number

This is never done , neither in numeric question or another. You can create a QuestionTheme if needed or a a plugin.

artasom

artasom

2020-04-01 08:52

reporter   ~56862

OK. Thanks for your help. Then I'd say the bug should be closed...

Issue History

Date Modified Username Field Change
2020-03-06 20:59 artasom New Issue
2020-03-06 20:59 artasom File Added: limesurvey_survey_415124.lss
2020-03-07 10:26 artasom Note Added: 56359
2020-03-09 07:43 DenisChenu Issue Monitored: DenisChenu
2020-03-09 08:15 DenisChenu File Added: Capture d’écran du 2020-03-09 08-14-33.png
2020-03-09 08:15 DenisChenu File Added: limesurvey_survey_arrayText-Fixed.lss
2020-03-09 08:15 DenisChenu Note Added: 56361
2020-03-16 18:35 cdorin Assigned To => cdorin
2020-03-16 18:35 cdorin Status new => feedback
2020-03-16 18:36 cdorin Note Added: 56577
2020-03-19 07:50 artasom Note Added: 56656
2020-03-19 07:50 artasom Status feedback => assigned
2020-03-19 08:59 DenisChenu File Added: Capture d’écran du 2020-03-19 08-58-26.png
2020-03-19 08:59 DenisChenu Note Added: 56657
2020-03-19 09:03 DenisChenu File Added: limesurvey_survey_415124_fixTips.lss
2020-03-19 09:03 DenisChenu File Added: Capture d’écran du 2020-03-19 09-02-51.png
2020-03-19 09:03 DenisChenu Note Added: 56659
2020-04-01 07:55 artasom Note Added: 56860
2020-04-01 08:45 DenisChenu Note Added: 56861
2020-04-01 08:52 artasom Note Added: 56862
2020-04-01 17:13 cdorin Status assigned => closed
2020-04-01 17:13 cdorin Description Updated
2020-04-01 17:13 cdorin Steps to Reproduce Updated
2021-08-06 02:16 guest Bug heat 6 => 8