View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
07324Bug reportsExpression Managerpublic2013-02-25 14:59
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Summary07324: Relevance on multi numeric break Sub-question validation equation:
Description

If you have some relevance on a question with Sub-question validation equation. The Sub-question validation equation can not be OK

Steps To Reproduce

Import included lss file,

  • Check Product 1 on 1st question: product 1 are filtered in the second equation.
  • Relevance equation is Products_P1<5 : it's OK if is empty bit not if it's not relevant.
  • You can not go next
Additional Information

Same think with sum(self)>5 for example : if one subq is not relevant then not validated.

The test is:
if(LEMif(LEManyNA('Products_P1'),'',(((LEMsum( ! (LEMval('Products_P1') < 5), ! (LEMval('Products_P1') < 5), ! (LEMval('Products_P1') < 5)) == 0))))){good}else{error}

Here, simple test can be:
if(LEMif(LEManyNA('Products_P1'),true,(((LEMsum( ! (LEMval('Products_P1') < 5), ! (LEMval('Products_P1') < 5), ! (LEMval('Products_P1') < 5)) == 0))))){good}else{error}

But if there are multiple condition:
For example Products_P1<5 AND Products_P2<3, we can not do:

if(LEMif(LEManyNA('Products_P1,Products_P2'),true,(((LEMsum( ! (LEMval('Products_P1') < 5) and ! (LEMval('Products_P1') < 3), ! (LEMval('Products_P1') < 5),! (LEMval('Products_P1') < 3), ! (LEMval('Products_P1') < 5)) == 0))))){good}else{error}

A good solution can be test each validation and put true in not relevant, but what for sum(self} ?

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)120224
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant
Git branch / Pull Request URL

Users monitoring this issue

TMSWhite

Activities

DenisChenu

DenisChenu

2013-02-24 19:08

developer   ~24241

Last edited: 2013-02-24 19:09

Oups ....

LEManyNA return false if one var is irrelevant.

c_schmitz

c_schmitz

2013-02-25 10:19

administrator   ~24251

Will you take this one?

DenisChenu

DenisChenu

2013-02-25 14:55

developer   ~24282

Last edited: 2013-02-25 14:55

Can take, but really don't know what to do.

Some test can be simple.

sum(self) do sum(self) with relevant sub question (else sum(self)==0)

But what for :
QQ_SQ1>1 && QQ_SQ2>2 : if SQ2 is irrelevant => False ? or not ?

It's a "need reflexion" bug.

Maybe have:
QQ_SQ1>1 become QQ_SQ1>1 OR notrelevant(QQ_SQ1) ?
Or a new function and remove the LEManyNA test ..

I'm not sure what is the best system.

DenisChenu

DenisChenu

2013-02-25 14:59

developer   ~24283

Sorry : not a bug ....

isrelevant function exist ....
NAOK

sum(self.NAOK) send true every time, but if need better control, can use sum(QQ_QS1.NAOK,QQ_QS2.NAOK,QQ_QS3.NAOK)>XXX

Issue History

Date Modified Username Field Change
2013-02-24 18:23 DenisChenu New Issue
2013-02-24 18:24 DenisChenu File Added: limesurvey_survey_EMrelevance_sqvalidation.lss
2013-02-24 19:08 DenisChenu Note Added: 24241
2013-02-24 19:09 DenisChenu Note Edited: 24241
2013-02-25 10:19 c_schmitz Note Added: 24251
2013-02-25 14:55 DenisChenu Note Added: 24282
2013-02-25 14:55 DenisChenu Note Edited: 24282
2013-02-25 14:57 c_schmitz Issue Monitored: TMSWhite
2013-02-25 14:59 DenisChenu Note Added: 24283
2013-02-25 14:59 DenisChenu Status new => closed
2013-02-25 14:59 DenisChenu Assigned To => DenisChenu
2013-02-25 14:59 DenisChenu Resolution open => fixed