Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
11412Bug reportsSurvey editingpublic2016-07-25 13:53
Reporteritcontactvki Assigned Toc_schmitz  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11412: When Using "Set Conditions" on a question using 2 scenarios and 2 conditions each, the final condition becomes OR OR OR
Description

I have two kind of people that take a survey, one of my organization and others. I want to distinguish between them using regular expression on the email of the user.

After I want to show the sum of two previous answers, if any of the two is different from 0.

So I use a question as an equation and I want to show it only if there is a match on the email and if at least one of the two previous answers is positive.

I use "Set Conditions" on the question and two scenarios.

Steps To Reproduce

Select a "Set Conditions", create two scenarios with 2 conditions, it is merged all together:
#############
((regexMatch("/vki.ac.be/", TOKEN:EMAIL))) or ((regexMatch("/vki.ac.be/", TOKEN:EMAIL))) or ((lunch.NAOK > "0")) or ((dinner.NAOK > "0"))
#############

If in one of the scenario there is not the same check for email, it is correct:

############
((regexMatch("/vki.ac.be/", TOKEN:EMAIL)) and (lunch.NAOK > "0")) or ((dinner.NAOK > "0"))
############

I have the impression that is the double regexMatch that messes things up: if I add a check on the first name, to have two different type of matches, the problem is there too:

############
((regexMatch("/vki.ac.be/", TOKEN:EMAIL))) or ((regexMatch("/Ciccio/", TOKEN:FIRSTNAME))) or ((lunch.NAOK > "0")) or ((dinner.NAOK > "0"))
############

Even changing the lss file and importing back does not work.

Additional Information

I had a problem before with the Relevance Equation for a single condition and that was solved in the Comfort Update Version 2.50+ Build 160620, but this is still a problem.

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)Version 2.50+ Build 160620
I will donate to the project if issue is resolvedYes
BrowserFirefox
Database type & versionmariadb 5.5.44
Server OS (if known)Centos 7.2.1511
Webserver software & version (if known)Apache 2.4.6
PHP Version5.4.6

Relationships

related to 09218 closedc_schmitz Small bug AND/OR 

Activities

DenisChenu

DenisChenu

2016-06-22 08:45

developer   ~39784

Quick and i think better solutiuon : make your condition with GUI
Copy the final condition shown
Delete all condition
Add it an expressin

There still an issue, but in fact Expression Manager system are really powerfull.
https://manual.limesurvey.org/Expression_Manager

itcontactvki

itcontactvki

2016-06-22 09:21

reporter   ~39785

Wunderbar! Deleting the conditions and inserting the correct expression directly as Relevance Equation seems to work: I need to test all combinations but this workaround surely it is progress.

c_schmitz

c_schmitz

2016-07-22 14:21

administrator   ~40025

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=19718

c_schmitz

c_schmitz

2016-07-25 13:53

administrator   ~40039

Version 2.50+ Build 160725 released

Related Changesets

LimeSurvey: master 0523d581

2016-07-22 12:20:32

c_schmitz

Details Diff
Fixed issue 11412: When Using token conditions across scenarios the final condition becomes ORed Affected Issues
11412
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2016-06-21 18:34 itcontactvki New Issue
2016-06-21 18:34 itcontactvki File Added: limesurvey_survey_926939.lss
2016-06-22 08:45 DenisChenu Note Added: 39784
2016-06-22 09:21 itcontactvki Note Added: 39785
2016-07-22 12:43 c_schmitz Relationship added related to 09218
2016-07-22 14:19 c_schmitz Assigned To => c_schmitz
2016-07-22 14:19 c_schmitz Status new => assigned
2016-07-22 14:21 c_schmitz Changeset attached => LimeSurvey master 0523d581
2016-07-22 14:21 c_schmitz Note Added: 40025
2016-07-22 14:21 c_schmitz Resolution open => fixed
2016-07-22 14:21 c_schmitz Status assigned => resolved
2016-07-22 14:21 c_schmitz Fixed in Version => 2.5
2016-07-25 13:53 c_schmitz Note Added: 40039
2016-07-25 13:53 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing