|Anonymous | Login||2015-10-10 14:29 CEST|
|My View | View Issues | Change Log | Roadmap | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|06787||Bug reports||[All Projects] Survey design||public||2012-10-27 14:50||2012-11-09 19:11|
|Status||closed||Resolution||no change required|
|Target Version||Fixed in Version||2.00+|
|Summary||06787: Multiple numerical input w/ sub-question equation validation + array filter|
|Description||I'm trying to set up a survey where we have 3 questions:|
Q1 - Multiple choice (mandatory)
Q2 - Multiple numerical input (mandatory)
Q3 - Multiple numerical input (mandatory)
Q2 and Q3 are array-filtering from Q1.
Each of Q3's values must be greater than Q2's. So, in its sub-question validation, I have put "this > that.Q2"
The survey does not let me proceed unless in Q1, I have checked ALL the options. Meaning that I think the logic behind the sub-question validation checks ALL of the input fields, even if they don't appear because they have been array-filtered. The "Mandatory" check of course does not include those.
It appears to be an issue with this question type when using array filtering and validation (either subquestion OR whole question... same problem). In my included example, I am using a simpler validation: just testing if each sub-question is a multiple of 3, with the same problem.
It seems the issue is with the validation algorithm trying to use fields which are hidden from the user (because of array filter). It should not be concerned with those fields that have been filtered by the array filter.
|Steps To Reproduce||Make a numerical input or multiple numerical input question type.|
Make another one, and array filter it.
Create subquestion or whole question validation on your 2nd question type, and don't check all options in your 1st question type.
You should be unable to proceed, and may notice some odd behaviour in your "tip" text as well.
|I will donate to the project if issue is resolved within 48 hrs||No|
|LimeSurvey build number OR git commit ID||121025|
|Database & DB-Version||mySQL 5|
|Operating System (Server)||Ubuntu|
|Webserver software & version||Apache 2.4.3|
|Attached Files||limesurvey_survey_899147.lss [^] (19,491 bytes) 2012-10-27 14:50|
|Not a bug but a mis-use of the 'that' macro variable. Please read the documentation and try the sample surveys|
I believe the key issue still remains. I have re-tested several different ways with the same result.
EM is trying to assess all subquestions regardless of whether or not they were array-filtered. So if Q2_b was not checked, EM will try to assess it against Q3_b as per Q3's equation, making it impossible to proceed.
|I tried also adding the is_empty function with an OR, but that didn't resolve it either. If the option at Q2 was selected but empty, it would validate, but otherwise, it would not proceed.|
|Still not a bug. Works exactly as designed. To avoid having filtered variables prevent validation, use .NAOK on all variables.|
I did that:
(Q3_A.NAOK> Q2_A.NAOK) && (Q3_B.NAOK> Q2_B.NAOK) && (Q3_C.NAOK> Q2_C.NAOK)
Still the same result. Sorry to keep re-opening the issue. If it's some basic mistake I'm making I can just continue to reply on the forum thread.
|I can look at this on Tuesday if somebody wants to look at it earlier that would be appreciated|
|Willing to donate money or my time for speedier resolution. I am not a PHP developer but can help in debugging or diagnosing, and can enlist the help of my PHP developer (has some experience with LS).|
|I'm not going to have time to look into this for at least another week. Freeing this up for another developer.|
With included lss file : change
((this/ 3) == floor(this/3))
((this.NAOK / 3) == floor(this.NAOK/3))
Like Thomas already say and it'sOK.
If you do the same in PHP : error.
(Q3_A.NAOK> Q2_A.NAOK) and !(is_empty(Q3_A.NAOK) or is_empty(Q2_A.NAOK))
Not a bug.
|2012-10-27 14:50||spacejanitor||New Issue|
|2012-10-27 14:50||spacejanitor||File Added: limesurvey_survey_899147.lss|
|2012-10-27 14:52||spacejanitor||Note Added: 21727|
|2012-10-27 15:34||TMSWhite||Note Added: 21729|
|2012-10-27 15:34||TMSWhite||Status||new => closed|
|2012-10-27 15:34||TMSWhite||Assigned To||=> TMSWhite|
|2012-10-27 15:34||TMSWhite||Resolution||open => no change required|
|2012-10-27 17:10||spacejanitor||Note Added: 21731|
|2012-10-27 17:10||spacejanitor||Status||closed => feedback|
|2012-10-27 17:10||spacejanitor||Resolution||no change required => reopened|
|2012-10-27 17:18||spacejanitor||Note Added: 21732|
|2012-10-27 17:18||spacejanitor||Status||feedback => assigned|
|2012-10-27 17:25||TMSWhite||Note Added: 21733|
|2012-10-27 17:25||TMSWhite||Status||assigned => closed|
|2012-10-27 17:25||TMSWhite||Resolution||reopened => no change required|
|2012-10-27 17:30||spacejanitor||Note Added: 21734|
|2012-10-27 17:30||spacejanitor||Status||closed => feedback|
|2012-10-27 17:30||spacejanitor||Resolution||no change required => reopened|
|2012-10-27 18:37||TMSWhite||Note Added: 21735|
|2012-10-28 14:57||spacejanitor||Note Added: 21740|
|2012-10-28 14:57||spacejanitor||Status||feedback => assigned|
|2012-11-09 01:59||TMSWhite||Note Added: 22038|
|2012-11-09 01:59||TMSWhite||Assigned To||TMSWhite =>|
|2012-11-09 01:59||TMSWhite||Status||assigned => new|
|2012-11-09 08:32||c_schmitz||Assigned To||=> DenisChenu|
|2012-11-09 08:32||c_schmitz||Status||new => assigned|
|2012-11-09 19:11||DenisChenu||Note Added: 22046|
|2012-11-09 19:11||DenisChenu||Status||assigned => closed|
|2012-11-09 19:11||DenisChenu||Resolution||reopened => no change required|
|2012-11-09 19:11||DenisChenu||Fixed in Version||=> 2.00+|
|Copyright © 2000 - 2015 MantisBT Team|