Anonymous Login
2016-10-01 12:17 CEST

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
06768Bug reports[All Projects] Expression Managerpublic2012-11-06 14:41
Reporterhelper 
Assigned Toc_schmitz 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
Product Version2.00+ 
Target VersionFixed in Version2.00+ 
Summary06768: Relevance equation works at question level but not at the group level
DescriptionNot sure that this is actually a bug... could be just a enhancement request.

There is an expectation that the one could skip an entire group by using a relevance equation. I attached the sample survey that I am working with.
Steps To ReproduceFor the attached survey, the following logic developed for the first question of group 2 (G-1) works at the question level.

sum(766173X18X201SQ001.valueNAOK,766173X18X202SQ001.valueNAOK) >= 3

Moving this to the group level relevance equation fails.
Complete LimeSurvey version number (& build)121024
I will donate to the project if issue is resolvedNo
BrowserChrome
Database & DB-VersionMSSQL
Operating System (Server)Windows7
Webserver software & versionApache 2.4
PHP Version5.4.7
Attached Files

-Relationships
related to 06808closedc_schmitz Inconsistent access to information from the token table 
child of 06744closedDenisChenu Expressionmanager show false error if admin lang are not in survey lang 
+Relationships

-Notes

~21633

DenisChenu (developer)

Hello,

2 things : can you put a lss files with functionnal condition : use condition editor for example, or a good expression manager.

In LS you make a sum(SGQA.valueNAOK ) but SHQA.valueNAOK are string here, not number.

Because : Relevance equation work at group level.

~21640

TMSWhite (reporter)

It works fine. You had a typo in your group-level relevance equation. It should have been:

sum(PHQ01_SQ001.valueNAOK, PHQ02_SQ001.valueNAOK) >= 3

~21649

helper (reporter)

I do not understand the note from Shnoulle.

TMSWhite: Sorry - this does not work fine. I took your suggestion and pasted directly into the group relevance equation AND removed the relevance equation from the question. No matter what I answer in the first two questions I get the group that I want to hide. Checked both of my installations (Windows7/MySQL and Windows2008r2/SQL Server) -- Same failure.

~21650

helper (reporter)

Rechecked this morning - see note.

~21651

helper (reporter)

Uploaded latest lss.

~21686

TMSWhite (reporter)

It works in all in one mode but not on group by group mode.

~21693

TMSWhite (reporter)

This works fine in all modes (question-by-question, group-by-group, and all-in-one) in version 1.92. It also used to work in 2.0, so it appears that a fix in the last few months broke that feature

I don't have time to address this issue, so I'm freeing it up for another developer.

~21696

mdekker (developer)

just tested the example survey: ls2_group_relevance and swithed to group-by-group mode and it worked just fine... so it is not just group mode but probably something more specific to this equation. (btw tested in preview mode)

~21697

DenisChenu (developer)

Thanks Menno ,

For preview mode : is survey preview, not Group preview ?

Denis

~21698

mdekker (developer)

complete survey, also attached survey here seems to work

~21699

mdekker (developer)

in runtime i get an error on the attached 945857

~21700

mdekker (developer)

Funny thing... when you put a reference like {sum(that.PHQ01.valueNAOK)} in second question, it seems to work. When you remove, it still works. Then logout, login... not working... must be some kind of caching issue.

~21701

DenisChenu (developer)

Argllll .... an EM cache issue ;)

~21702

DenisChenu (developer)

Menno : can you have a look at http://bugs.limesurvey.org/view.php?id=6744 and see if you reproduce ?

I have it, but TMS and Carsten don't have :snif:

~21710

DenisChenu (developer)

Think it's a EM session cache issue.
Please helper try this:

Before starting the survey : click on menu Survey properties/Survey logic files.
And after (only after) launch the survey (with the do.png image file to have newtest=Y).

~21758

DenisChenu (developer)

Can not reproduce with this survey, plese test after last patch
http://bugs.limesurvey.org/view.php?id=6744#c21755

If you can use Git : do a git pull and test again.

~21759

DenisChenu (developer)

And something other:
For me :
sum(PHQ01_SQ001.valueNAOK, PHQ02_SQ001.valueNAOK) is allway egual to 0.
Because PHQ01_SQ001.valueNAOK and PHQ02_SQ001.valueNAOK are string ("A1","A2", ...)

~21760

helper (reporter)

I am a bit perplexed at the response and the proposed fix. First, I took a look at the GIT version of the file (which is considerably larger than the one in my current version). Without doing a direct compare, I would say there is a fairly substantial difference and will wait for the release associated with this specific file rather than risk the potental affects.

Second, the assertation that this sum does not work for Shnoulle provides for some additional confusion in that this sum works fine at the question level, which would preculed itself to the fact that there are some sort of numeric values rather than the string values that Shnoulle claims.

I updated to version Version 2.00+ Build 121025 yesterday. Again, I took the "cut" the logic formula at the question and "pasted" that formula into the group with very different results. The group does not use the conditional while the question does.

~21761

DenisChenu (developer)

I test sum(PHQ01_SQ001.valueNAOK, PHQ02_SQ001.valueNAOK) in question text, and i have allways 0. And, for me, is really 0.
For example sum("A1","A3") = O and not another think.

If question can be show: can you tell me what the user select to show the question ? The bug is here : the question have not no be show, because sum can't be >3.

Denis

~21762

DenisChenu (developer)

PS: you can reopen it, but i don't understand what is the problem, the i can't take the bug :).

~21763

helper (reporter)

The simplest of question has not been answered:

Why does the forumula work at the question level while NOT working at the Group?

~21788

helper (reporter)

Updated to Version 2.00+ Build 121030 - neither question or group work with values.

~21789

helper (reporter)

I guess that the expectation here is that the "valueNAOK" would read the assessment value, while "NAOK" would read the code for the array. This would allow the flexibility to use conditional logic based on a rating rather than on a code that could be used for some other trigger.

~21793

DenisChenu (developer)

Last edited: 2012-10-30 18:47

View 3 revisions

Oups .... you're right , value give assessment .... (never used this EM possibility)

Then i test again with this information (really sorry), and relevance for group seems to work.

If i select: Several days+Several days : group2 not show
If i select: More than half the days+Several days : group2 show

(allways use newtest=Y)

~21807

TMSWhite (reporter)

It looks as though assessment value is not being handled properly at all in 2.0

The attached survey (limesurvey_survey_152167.lss) works fine in 1.92, but not in 2.0. In 1.92, the Show Logic File shows the assessment values; and the .value page of the running survey shows the proper values. Neither works properly in 2.0.

~21810

DenisChenu (developer)

When i try to import you lss file i have : Property "Questions.tid" is not defined.

~21811

helper (reporter)

Uploaded the latest lsa with logic in the groups and not in the questions.

~21884

TMSWhite (reporter)

Denis, that file imports fine for me. Could you be trying to import into 2.1 instead of 2.0?

~21885

TMSWhite (reporter)

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

~21886

TMSWhite (reporter)

This patch fixes Show Logic File. Once you show logic file once, the group-by-group relevance works fine. However, if you try it before running show logic file, it does not work. So, some assessment-related parameter may be getting cached via Show Logic File.

~21893

DenisChenu (developer)

Thomas,

No try to import at 2.0 :
CException
 Property "Questions.tid" is not defined.
:
htdocs/limesurvey_GIT/LimeSurvey/application/models/Questions.php(253): CActiveRecord->__set("tid", "0") (line 253)

htdocs/limesurvey_GIT/LimeSurvey/application/helpers/admin/import_helper.php(3610): Questions->insertRecords(array("parent_qid" => "0", "sid" => "678718", "gid" => "123", "tid" => "0", ...))
line 3610

And Yes, i don't know a tid in Question


Can you upload the tsv file ?

~21902

c_schmitz (administrator)

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

~21905

TMSWhite (reporter)

Denis-

tid is only used in 2.1, and is not found anywhere in 2.0. Please checkout master and try again (forcing a clean checkout if needed).

~21911

c_schmitz (administrator)

Hello Thomas,

I don't think this is related to assessments at all - there seems to be a general caching problem with EM - as an example see issue 06808 and we have these error all over the application.

Some can be fixed by selecting another survey and going back. Some (like 06808) only by selecting the 'show survey logic' function. We really need your help on this one.

~21918

TMSWhite (reporter)

What is the preferred way to handle caching in Yii? Perhaps we can bulk switch to that aproach.

~21919

c_schmitz (administrator)

In general there is barely any caching in Yii, so I am still wondering where this comes from.

I think it has something to do with the new way the survey session is stored as these issues only seem to happen on survey taking - problem is that I don't know where to start to look. Why would looking at the survey logic resolve this issue?

~21920

TMSWhite (reporter)

2.1 might also help. I use caching because the setVariabkeAndToken function is expensive and does a lot of processing. If we avoid that runtime processing by puting those dynamic fiekda into the database at design time, we would not need as much, if any, caching.

~21935

DenisChenu (developer)

Hello,

Maybe an partial fix,
Principle: when a admin launch a preview, then the survey is in testing mode. There are good chance EM is not stable, and cache is obsolete.

Then , fore EM refresh in :
_userHasPreviewAccessSession function (from controler/survey/index.php for 2.0)

Denis
PS: can do it in a fork and take some test.

~21971

c_schmitz (administrator)

It seems that this issue only happens in connecction with the administration.
I now implemented a SetDirtyFlag in killSession and it seems to work fine.

@helper: can you check out the patch from 06808 ?

~21991

helper (reporter)

I patched my local with http://bugs.limesurvey.org/view.php?id=6808 - all seems good now.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2012-10-24 17:25 helper New Issue
2012-10-24 17:25 helper Status new => assigned
2012-10-24 17:25 helper Assigned To => TMSWhite
2012-10-24 17:25 helper File Added: limesurvey_survey_766173.lss
2012-10-24 21:30 DenisChenu Note Added: 21633
2012-10-25 06:16 TMSWhite Note Added: 21640
2012-10-25 06:16 TMSWhite Status assigned => resolved
2012-10-25 06:16 TMSWhite Resolution open => no change required
2012-10-25 13:47 helper Note Added: 21649
2012-10-25 13:47 helper Note Added: 21650
2012-10-25 13:47 helper Status resolved => feedback
2012-10-25 13:47 helper Resolution no change required => reopened
2012-10-25 13:50 helper File Added: limesurvey_survey_945857.lss
2012-10-25 13:50 helper Note Added: 21651
2012-10-25 13:50 helper Status feedback => assigned
2012-10-25 17:08 TMSWhite Note Added: 21686
2012-10-26 06:24 TMSWhite Note Added: 21693
2012-10-26 06:24 TMSWhite Assigned To TMSWhite =>
2012-10-26 06:24 TMSWhite Status assigned => new
2012-10-26 09:42 DenisChenu Assigned To => DenisChenu
2012-10-26 09:42 DenisChenu Status new => assigned
2012-10-26 10:57 mdekker Note Added: 21696
2012-10-26 11:09 DenisChenu Note Added: 21697
2012-10-26 11:13 mdekker Note Added: 21698
2012-10-26 11:15 mdekker Note Added: 21699
2012-10-26 11:27 mdekker Note Added: 21700
2012-10-26 11:38 DenisChenu Note Added: 21701
2012-10-26 11:39 DenisChenu Note Added: 21702
2012-10-26 14:44 DenisChenu Note Added: 21710
2012-10-26 14:44 DenisChenu Relationship added child of 06744
2012-10-30 11:30 DenisChenu Note Added: 21758
2012-10-30 11:34 DenisChenu Note Added: 21759
2012-10-30 11:34 DenisChenu Status assigned => resolved
2012-10-30 11:34 DenisChenu Fixed in Version => 2.00+
2012-10-30 11:34 DenisChenu Resolution reopened => fixed
2012-10-30 12:56 helper Note Added: 21760
2012-10-30 13:06 DenisChenu Note Added: 21761
2012-10-30 13:07 DenisChenu Assigned To DenisChenu =>
2012-10-30 13:07 DenisChenu Note Added: 21762
2012-10-30 13:10 helper Note Added: 21763
2012-10-30 13:10 helper Status resolved => feedback
2012-10-30 13:10 helper Resolution fixed => reopened
2012-10-30 18:07 helper Note Added: 21788
2012-10-30 18:07 helper Status feedback => new
2012-10-30 18:10 helper Note Added: 21789
2012-10-30 18:46 DenisChenu Note Added: 21793
2012-10-30 18:46 DenisChenu Note Edited: 21793 View Revisions
2012-10-30 18:47 DenisChenu Note Edited: 21793 View Revisions
2012-10-31 02:57 TMSWhite File Added: limesurvey_survey_152167.lss
2012-10-31 02:58 TMSWhite Note Added: 21807
2012-10-31 10:24 DenisChenu Note Added: 21810
2012-10-31 12:23 helper File Added: survey_archive_383498.lsa
2012-10-31 12:24 helper Note Added: 21811
2012-11-02 03:01 TMSWhite Note Added: 21884
2012-11-02 05:07 TMSWhite Changeset attached => LimeSurvey master 5a83cf58
2012-11-02 05:07 TMSWhite Note Added: 21885
2012-11-02 05:13 TMSWhite Note Added: 21886
2012-11-02 10:54 DenisChenu Note Added: 21893
2012-11-02 11:18 c_schmitz Changeset attached => LimeSurvey 2.1 ebc4a7a8
2012-11-02 11:18 c_schmitz Note Added: 21902
2012-11-02 12:34 TMSWhite Note Added: 21905
2012-11-02 13:36 c_schmitz Relationship added related to 06808
2012-11-02 13:36 c_schmitz Assigned To => c_schmitz
2012-11-02 13:36 c_schmitz Status new => assigned
2012-11-02 13:40 c_schmitz Note Added: 21911
2012-11-02 15:13 TMSWhite Note Added: 21918
2012-11-02 15:20 c_schmitz Note Added: 21919
2012-11-02 15:36 TMSWhite Note Added: 21920
2012-11-03 14:49 DenisChenu Note Added: 21935
2012-11-06 09:05 c_schmitz Note Added: 21971
2012-11-06 09:05 c_schmitz Status assigned => feedback
2012-11-06 13:44 helper Note Added: 21991
2012-11-06 13:44 helper Status feedback => assigned
2012-11-06 14:41 c_schmitz Status assigned => resolved
2012-11-06 14:41 c_schmitz Resolution reopened => fixed
2012-11-06 14:41 c_schmitz Status resolved => closed
+Issue History