View Issue Details

IDProjectCategoryView StatusLast Update
08647Bug reports[All Projects] Survey designpublic2014-02-03 08:58
ReporterjonaskoeppelAssigned Toc_schmitz 
Status closedResolutionwon't fix 
Product Version 
Target VersionFixed in Version 
Summary08647: Disfunctional Relevance Equation with "Equation" question type and $deletenonvalues = 0

If $deletenonvalues is set to 0 in /application/config/config-defaults.php the relevance equation of "Equation" question types doesn't seem to work. The equation is always evaluated even if the question is irrelevant and hence the question not shown in the survey.

The result are values like "0" or "NAN" in the database were they should be NULLED. Furthermore, values that were onces saved are deleted (set to "0" or "NAN") where they should be preserved when the question becomes irrelevant afterwards (the reason to deactivate $deletenonvalues).

Steps to reproduce:

  1. set $deletenonvalues to 0 in /application/config/config-defaults.php
  2. create new survey with standard settings
  3. create new group with standard settings
  4. create question of Yes/No type with standard settings (test1)
  5. create question of Numercial Input type (test2) with relevance equation test1 == 'Y'
  6. create question of Equation type (test3) with relevance equation test1 == 'Y' and the equation {test2 * 20}
  7. Activate survey.
    7.Run survey and answer test1 with yes. Put in a random value in test2 and complete the survey.
    The correct value is saved in the database.
  8. Run survey and answer test1 with no (or no answer) and complete the survey.
    The value "0" is saved in the database where the field should be NULLED
TagsNo tags attached.
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Database & DB-Version
Server OS (if known)
Webserver software & version (if known)
PHP Version




2014-01-31 16:08


test_relevance_equation.lss (13,467 bytes)


2014-02-01 15:52

administrator   ~28372

Which version and build are you using?



2014-02-01 16:22

reporter   ~28375

Version 2.05+ Build 140125

Sorry for not having indicated it. Also, here is the corresponding forum threat:



2014-02-01 18:20

developer   ~28382

Last edited: 2014-02-01 18:21

View 2 revisions

@jonaskoeppel : you can give a try to this plugin :
( Like allways : witout guarantee ;))



2014-02-01 19:02

reporter   ~28383

Thanks a lot Denis! But it doesn't seem to work. I activated the plug-in but nothing changes. Do I have to do anything else than activating it?



2014-02-01 19:22

developer   ~28385


1st : go to Plugin config and set "According to deletenonvalue" at Validate all relevance for question, and null value if needed (I have to update it, it must be the dafault)
2nd : go to browse response and look if you have a new button
3rd: if yes : look at the value set



2014-02-01 19:39

reporter   ~28386

No new button, unfortunately ... It should in the "Display responses" menu, right?



2014-02-03 08:58

administrator   ~28420

On examining the issue I cannot really say it is a bug but by design.
All EM expressions are recalculated all the time during survey taking. Deactivating Deletennonvalues essentially deactivates the clean-up (which checks if the equation question was irrelevant) and in the code there is an explicit instruction to process the equation if deletenonvalues is disabled.

I am currently hesitant to change this as it could have unforeseen consequences - some user may even want this behaviour.
Sorry, currently this a 'no fix', sorry.

Issue History

Date Modified Username Field Change
2014-01-31 16:08 jonaskoeppel New Issue
2014-01-31 16:08 jonaskoeppel File Added: test_relevance_equation.lss
2014-02-01 13:47 DenisChenu Project Feature requests => Bug reports
2014-02-01 15:52 c_schmitz Note Added: 28372
2014-02-01 15:52 c_schmitz Assigned To => c_schmitz
2014-02-01 15:52 c_schmitz Status new => feedback
2014-02-01 16:22 jonaskoeppel Note Added: 28375
2014-02-01 16:22 jonaskoeppel Status feedback => assigned
2014-02-01 18:20 DenisChenu Note Added: 28382
2014-02-01 18:21 DenisChenu Note Edited: 28382 View Revisions
2014-02-01 19:02 jonaskoeppel Note Added: 28383
2014-02-01 19:22 DenisChenu Note Added: 28385
2014-02-01 19:39 jonaskoeppel Note Added: 28386
2014-02-03 08:58 c_schmitz Note Added: 28420
2014-02-03 08:58 c_schmitz Status assigned => closed
2014-02-03 08:58 c_schmitz Resolution open => won't fix