LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
08647Bug reports[All Projects] Survey designpublic2014-01-31 16:082014-02-03 08:58
Reporterjonaskoeppel 
Assigned Toc_schmitz 
PrioritynormalSeverityfeature 
StatusclosedResolutionwon't fix 
Product Version 
Target VersionFixed in Version 
Summary08647: Disfunctional Relevance Equation with "Equation" question type and $deletenonvalues = 0
DescriptionIf $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'
5. create question of Equation type (test3) with relevance equation test1 == 'Y' and the equation {test2 * 20}
6. 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
I will donate to the project if issue is resolved within 48 hrs
LimeSurvey build number OR git commit ID
Browser
Database & DB-Version
Operating System (Server)
Webserver software & version
PHP Version
Attached Files? file icon test_relevance_equation.lss [^] (13,467 bytes) 2014-01-31 16:08

- Relationships

-  Notes
User avatar (28372)
c_schmitz (administrator)
2014-02-01 15:52

Which version and build are you using?
User avatar (28375)
jonaskoeppel (reporter)
2014-02-01 16:22

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 [^]
User avatar (28382)
DenisChenu (developer)
2014-02-01 18:20
edited on: 2014-02-01 18:21

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

User avatar (28383)
jonaskoeppel (reporter)
2014-02-01 19:02

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?
User avatar (28385)
DenisChenu (developer)
2014-02-01 19:22

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
User avatar (28386)
jonaskoeppel (reporter)
2014-02-01 19:39

No new button, unfortunately ... It should in the "Display responses" menu, right?
User avatar (28420)
c_schmitz (administrator)
2014-02-03 08:58

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 Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: jonaskoeppel
Opponents: No one explicitly opposes this issue yet.

- 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


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker