View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
03673Bug reportsSurvey takingpublic2009-09-11 22:50
ReporterMazi Assigned Tolemeur  
PrioritynormalSeverityminor 
Status closedResolutionwon't fix 
Product Version1.85+ 
Summary03673: Condition "IF Q1==Q2 SHOW Q3" doesn't work in all-in-one surveys
Description

Attached you can find a survey with 2 text questions and 2 boilerplate questions. The boilerplate questions use conditons to be displayed
a) IF Q1 == Q2
b) IF Q1 != Q2

When loading the survey in all-in-one mode both boilerplate questions are shown thought they use contradictory conditions.
When typing text one of the boilerplate questions disappears.
BUT: When typing e.g. "a" into both fields condition b) should NOT be met but isn't interpreted correctly so both boilerplates are shown.

TagsNo tags attached.
Attached Files
limesurvey_survey_67855-BUG3673.csv (4,491 bytes)   
# LimeSurvey Survey Dump
# DBVersion 138
# This is a dumped survey from the LimeSurvey Script
# http://www.limesurvey.org/
# Do not change this header!

#
# SURVEYS TABLE
#
"sid","owner_id","admin","active","expires","startdate","adminemail","private","faxto","format","template","language","additional_languages","datestamp","usecookie","notification","allowregister","allowsave","autonumber_start","autoredirect","allowprev","printanswers","ipaddr","refurl","datecreated","listpublic","htmlemail","tokenanswerspersistence","usecaptcha","bounce_email","publicstatistics","publicgraphs","assessments","usetokens","attributedescriptions"
"67855","1","Marcel Minke","Y","","","mail@marcel-minke.de","Y","","A","limespired","en","","N","N","0","N","Y","0","N","Y","N","N","N","2009-03-01","N","Y","N","D","mail@marcel-minke.de","N","N","N","N",""

#
# GROUPS TABLE
#
"gid","sid","group_name","group_order","description","language"
"95","67855","Group 1","0","","en"

#
# QUESTIONS TABLE
#
"qid","sid","gid","type","title","question","preg","help","other","mandatory","lid","lid1","question_order","language"
"658","67855","95","S","email1","Please enter your email adress:<br />","/(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})/","","N","Y","0","0","0","en"
"659","67855","95","S","email 2","Please enter your email adress <b>again</b>:<br />","","","N","Y","0","0","1","en"
"660","67855","95","X","boiler-error","The email adresses you entered don't match!<br />\n<br />\nPlease use the back button to correct your entries.<br />","","","N","N","0","0","2","en"
"661","67855","95","X","boiler-fine","The email adresses you entered match!<br />\n<br />\nPlease use the next button to proceed.<br />","","","N","N","0","0","3","en"

#
# ANSWERS TABLE
#

#
# CONDITIONS TABLE
#
"cid","qid","scenario","cqid","cfieldname","method","value"
"2174","661","1","658","67855X95X658","==","@67855X95X659@"
"386","660","1","658","67855X95X658","!=","67855X95X659"

#
# LABELSETS TABLE
#

#
# LABELS TABLE
#

#
# QUESTION_ATTRIBUTES TABLE
#

#
# ASSESSMENTS TABLE
#

#
# SURVEYS_LANGUAGESETTINGS TABLE
#
"surveyls_survey_id","surveyls_language","surveyls_title","surveyls_description","surveyls_welcometext","surveyls_urldescription","surveyls_email_invite_subj","surveyls_email_invite","surveyls_email_remind_subj","surveyls_email_remind","surveyls_email_register_subj","surveyls_email_register","surveyls_email_confirm_subj","surveyls_email_confirm","surveyls_url","surveyls_endtext","surveyls_dateformat"
"67855","en","Email Test","This survey is for testing email adresses.<br />","","","Invitation to participate in survey","Dear {FIRSTNAME},<br /><br />You have been invited to participate in a survey.<br /><br />The survey is titled:<br />""{SURVEYNAME}""<br /><br />""{SURVEYDESCRIPTION}""<br /><br />To participate, please click on the link below.<br /><br />Sincerely,<br /><br />{ADMINNAME} ({ADMINEMAIL})<br /><br />----------------------------------------------<br />Click here to do the survey:<br />{SURVEYURL}","Reminder to participate in survey","Dear {FIRSTNAME},<br /><br />Recently we invited you to participate in a survey.<br /><br />We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.<br /><br />The survey is titled:<br />""{SURVEYNAME}""<br /><br />""{SURVEYDESCRIPTION}""<br /><br />To participate, please click on the link below.<br /><br />Sincerely,<br /><br />{ADMINNAME} ({ADMINEMAIL})<br /><br />----------------------------------------------<br />Click here to do the survey:<br />{SURVEYURL}","Survey registration confirmation","Dear {FIRSTNAME},<br /><br />You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.<br /><br />To complete this survey, click on the following URL:<br /><br />{SURVEYURL}<br /><br />If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.","Confirmation of completed survey","Dear {FIRSTNAME},<br /><br />This email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.<br /><br />If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.<br /><br />Sincerely,<br /><br />{ADMINNAME}","","","1"

#
# QUOTA TABLE
#

#
# QUOTA_MEMBERS TABLE
#

#
# QUOTA_LANGUAGESETTINGS TABLE
#

Bug heat8
Complete LimeSurvey version number (& build)7610
I will donate to the project if issue is resolved
BrowserFF3
Database type & versionMy Sql 5.1.30
Server OS (if known)Win XP Sp 3
Webserver software & version (if known)Apache 2.2
PHP Version5.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

user4866

2009-09-10 21:59

  ~09513

It seems theres a problem when a condition is made on an empty textfield, inside the same group.
q1 asks for age.
q2 appears only if nothing is written in q1.

The bug - q2 appears despite the condition.

jelo

jelo

2009-09-10 22:12

partner   ~09514

First impression - Food for thought:

To solve this problem you would need a feature which allows to control when to trigger the conditioncheck. Or to trigger conditions at different times.

In this example the check should not be triggered when entering something in the fields, but when leaving focus of the second field.

The easiest way would be to allow to check some conditions only when submitting the survey (even on all on one page). When e.g "other fields" are not filled with text the are not checked before hitting submit.

In the end we will see a nice JavaScript IDE within LimeSurvey with a long list of eventtrigger to assign conditions to. Just kidding.

lemeur

lemeur

2009-09-10 22:50

developer   ~09515

The attached survey is faulty: condition on question 3 is missing @@ enclosing tags

"2174","661","1","658","67855X95X658","==","@67855X95X659@"
"386","660","1","658","67855X95X658","!=","67855X95X659"

With a correct survey I see no error.

Thibault

Mazi

Mazi

2009-09-10 23:42

updater   ~09520

You are absolutely right, Thibault. Are the "@" marks added automatically when adding a condition based on an answer of another question?

@asafbo, can you please attach your survey so we can check this one? It uses different conditions and the problems was also conformed by jelo, who is also invited to provide a sample survey :-)

jelo

jelo

2009-09-11 00:03

partner   ~09522

I imported the survey and the conditions of question 3 where not converted to the correct SGQA identifier. After correcting the condition it is working fine.

@Mazi
My comment above was more intended to the case we chatted a few hours ago. The guy with the issue was asked to add his case here.

Two questions on one page. If textfield of first question stays empty the second question should be shown. Which is not possible without preventing the conditions to be triggered before hitting the submit button. Will be better to create a new ticket for that issue.

user4866

2009-09-11 07:10

  ~09524

I uploaded the survey structure

jelo

jelo

2009-09-11 10:34

partner   ~09525

limesurvey_survey_54317.csv illustrates the following:

Question 1 asked for the age via textfield.

Question 2 should only be showed if Question 1 is unanswered.

Both questions are on one page.

When the survey is loaded Questions 2 is shown because condition "only show if question 1 is unanswered" is true. Since we cannot differentiate if an empty textfield means "still unanswered" or "no answer" question 2 had to be hidden till the submit button is clicked. It would be the same behaviour as when you choose a other text field in a multioption question and forgot to enter text into the other field.

For me the question is "Should the aim really be to keep the same functionality in every format "All-In-one", "Group-by-Group" and "Question by Question".
Group-by-Group is the most important format. It is nice that you can use conditions on the same page, but not every filter concepts needs to be supported when showing all relevant questions on one page.

lemeur

lemeur

2009-09-11 21:54

developer   ~09533

@Jelo,

It is impossible to prevent condition evals from beeing done at page load in Group by Group surveys: this is by design.

It is consistent with question-per-page and all-in-one surveys: which is important for us.

In your case, I would:

  • have a first question asking if the participant accept to give his exact age
  • if yes present the age question
  • if no present the dropdown with age ranges
jelo

jelo

2009-09-11 22:23

partner   ~09534

It isn't my case ;-) It was asafbo in the chat (please correct me, if I am wrong and it was different person). Just wanted to point out that it isn't working without a code concept/design change. Thanks for confirming that.

I am fine with the oldskool method of allocating these questions in different groups. Open textfield on the first page and if the field is empty asking again on the next page.

lemeur

lemeur

2009-09-11 22:50

developer   ~09537

@jelo,
Sorry I thought it was your case.

Anyway, I don't really imagine any possible workaround for this, even if we try to redesign the conditions for LS2: How do you want us to know if the participant has answered or not a text question on the same page !

Anyway, I think a new ticket on LS2 project with a clear description of what asafbo wanted to do could help design LS2 conditions.

Closing this ticket as far as LS1 is concerned though.

Issue History

Date Modified Username Field Change
2009-09-10 15:48 Mazi New Issue
2009-09-10 15:48 Mazi Status new => assigned
2009-09-10 15:48 Mazi Assigned To => user372
2009-09-10 15:48 Mazi Build Number => 7610
2009-09-10 15:48 Mazi Browser => FF3
2009-09-10 15:48 Mazi Database & DB-Version => My Sql 5.1.30
2009-09-10 15:48 Mazi Operating System (Server) => Win XP Sp 3
2009-09-10 15:48 Mazi Webserver => Apache 2.2
2009-09-10 15:48 Mazi PHP Version => 5.2
2009-09-10 15:48 Mazi File Added: limesurvey_survey_67855-BUG3673.csv
2009-09-10 15:49 Mazi Assigned To user372 => lemeur
2009-09-10 21:59 user4866 Note Added: 09513
2009-09-10 22:12 jelo Note Added: 09514
2009-09-10 22:50 lemeur Note Added: 09515
2009-09-10 22:50 lemeur Status assigned => feedback
2009-09-10 23:42 Mazi Note Added: 09520
2009-09-11 00:03 jelo Note Added: 09522
2009-09-11 07:10 user4866 File Added: limesurvey_survey_54317.csv
2009-09-11 07:10 user4866 Note Added: 09524
2009-09-11 10:34 jelo Note Added: 09525
2009-09-11 21:54 lemeur Note Added: 09533
2009-09-11 22:23 jelo Note Added: 09534
2009-09-11 22:50 lemeur Note Added: 09537
2009-09-11 22:50 lemeur Status feedback => closed
2009-09-11 22:50 lemeur Resolution open => won't fix
2010-10-25 00:18 c_schmitz Category Survey at Runtime => Survey taking