View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18191Bug reportsExpression Managerpublic2022-06-17 11:52
Reportertammo Assigned Totammo  
PrioritynoneSeveritypartial_block 
Status feedbackResolutionopen 
Product Version5.3.x 
Summary18191: Cannot use statCount in group condition
Description

Using core plugin: statFunctions

While you can use statCount("id") > 6 as question condition, you cannot use this as the condition for a group.

This results (when trying to save the just edited group) to an error 500: Call to a member function getIsActive() on null

This

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.3.19
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL
Server OS (if known)Centos
Webserver software & version (if known)Apache
PHP Version7.4

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-06-14 17:38

developer   ~70351

An lss please ?

tammo

tammo

2022-06-14 17:46

developer   ~70352

tammo

tammo

2022-06-14 17:47

developer   ~70353

I cannot demonstrate adding statCount>6 to the group condition, since this ends in an error 500.

DenisChenu

DenisChenu

2022-06-14 17:51

developer   ~70354

Yes, but have a lss : less work for me ;)

DenisChenu

DenisChenu

2022-06-14 17:55

developer   ~70355

Can not reproduce …

  1. Import included survey
  2. Goes to second group
  3. Edit , put statCount("id") > 6 in condition
  4. Save …

Can you activate debug mode ?

I can create a fix here : https://github.com/LimeSurvey/LimeSurvey/blob/420083bf67ffae54b80505896962baa1751bf851/application/core/plugins/statFunctions/countFunctions.php#L29
But i like to know how to reproduce the issue :)

DenisChenu

DenisChenu

2022-06-14 18:01

developer   ~70356

PS : and check if validate survey logic file fix the issue ( set the sid in LimeExpressionManager)

DenisChenu

DenisChenu

2022-06-14 18:57

developer   ~70360

https://github.com/LimeSurvey/LimeSurvey/pull/2466

DenisChenu

DenisChenu

2022-06-17 11:51

developer   ~70402

@tammo :

Can not reproduce …

Import included survey
Goes to second group
Edit , put statCount("id") > 6 in condition
Save …

Can you activate debug mode ?

Issue History

Date Modified Username Field Change
2022-06-14 17:10 tammo New Issue
2022-06-14 17:10 tammo Assigned To => DenisChenu
2022-06-14 17:10 tammo Status new => assigned
2022-06-14 17:38 DenisChenu Note Added: 70351
2022-06-14 17:38 DenisChenu Bug heat 0 => 2
2022-06-14 17:46 tammo Note Added: 70352
2022-06-14 17:46 tammo File Added: survey_archive_statCountFunctionsTest.lsa
2022-06-14 17:46 tammo Bug heat 2 => 4
2022-06-14 17:47 tammo Note Added: 70353
2022-06-14 17:51 DenisChenu Note Added: 70354
2022-06-14 17:55 DenisChenu Note Added: 70355
2022-06-14 17:55 DenisChenu File Added: Capture d’écran du 2022-06-14 17-53-08.png
2022-06-14 18:01 DenisChenu Note Added: 70356
2022-06-14 18:01 DenisChenu Status assigned => feedback
2022-06-14 18:57 DenisChenu Note Added: 70360
2022-06-17 11:51 DenisChenu Note Added: 70402
2022-06-17 11:52 DenisChenu Assigned To DenisChenu => tammo