View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08647Bug reportsSurvey editingpublic2014-02-03 08:58
Reporterjonaskoeppel Assigned Toc_schmitz  
PrioritynormalSeverityfeature 
Status closedResolutionwon't fix 
Summary08647: Disfunctional Relevance Equation with "Equation" question type and $deletenonvalues = 0
Description

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.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Users monitoring this issue

jonaskoeppel

Activities

c_schmitz

c_schmitz

2014-02-01 15:52

administrator   ~28372

Which version and build are you using?

jonaskoeppel

jonaskoeppel

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:

http://www.limesurvey.org/en/forum/design-issues/95854-relevance-equation-of-equation-question-type

DenisChenu

DenisChenu

2014-02-01 18:20

developer   ~28382

Last edited: 2014-02-01 18:21

@jonaskoeppel : you can give a try to this plugin : https://github.com/Shnoulle/LS-recomputeExpression
( Like allways : witout guarantee ;))

jonaskoeppel

jonaskoeppel

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?

DenisChenu

DenisChenu

2014-02-01 19:22

developer   ~28385

Hi,

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

jonaskoeppel

jonaskoeppel

2014-02-01 19:39

reporter   ~28386

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

c_schmitz

c_schmitz

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
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-02 12:34 jonaskoeppel Issue Monitored: jonaskoeppel
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
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing
2021-08-10 01:24 guest Bug heat 6 => 8