View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18049Bug reportsRemoteControlpublic2026-10-13 11:50
Reporterprobesys Assigned Toc_schmitz  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version5.3.x 
Summary18049: Remote Control export statistic not work for certain type of fields
Description

Hi,

I found that some field types cannot be exported.

Indeed, the format of the fields of the sql queries is not good.

I don't know if it's good practice, I fixed the problem.

The file : common_helper.php

The function : createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)

--- a/public/ls/application/helpers/common_helper.php
+++ b/public/ls/application/helpers/common_helper.php
@@ -1184,7 +1184,8 @@ function createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)

             //go through all the (multiple) answers
             foreach ($result as $row) {
  • $myfield2 = $flt['type'] . $myfield . reset($row);
  • //$myfield2 = $flt['type'] . $myfield . reset($row);
  • $myfield2 = $flt['type'].$myfield .$row['title'];//fix bug probesys
    $allfields[] = $myfield2;
    }
    break;
    @@ -1199,7 +1200,8 @@ function createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)

             //go through all the (multiple) answers
             foreach ($result as $row) {
  • $myfield2 = $myfield . reset($row);
  • //$myfield2 = $myfield . reset($row);
  • $myfield2 = $myfield .$row['title'];//fix bug probesys
    $allfields[] = $myfield2;
    }
    break;
    @@ -1217,7 +1219,8 @@ function createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)
    foreach ($result as $row) {
    $fresult = Question::model()->getQuestionsForStatistics('title, question', "parent_qid=$flt[qid] AND language = '{$sLanguage}' AND scale_id = 1", 'question_order');
    foreach ($fresult as $frow) {
  • $myfield2 = $myfield . reset($row) . "_" . $frow['title'];
  • //$myfield2 = $myfield . reset($row) . "_" . $frow['title'];
  • $myfield2 = $myfield .$row['title']. "_" . $frow['title'];//fix bug probesys
    $allfields[] = $myfield2;
    }
    }
Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)5.3.6
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.31
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-07-05 15:32

developer   ~70737

Would you please crate a PR for this?

probesys

probesys

2022-07-07 14:50

reporter   ~70788

I push a pull request

https://github.com/LimeSurvey/LimeSurvey/pull/2502/commits/a34c39ecf400599f25806db2e239053bc29af4ac

gabrieljenik

gabrieljenik

2022-07-11 14:22

developer   ~70848

Thanks.

If I am right the root cause of the problem is that the parameter fields is never used here.
https://github.com/prob6/LimeSurvey/blob/a34c39ecf400599f25806db2e239053bc29af4ac/application/models/Question.php#L512

Right?

gabrieljenik

gabrieljenik

2022-07-27 22:28

developer   ~71203

Shouldn't this solution be applied for Dual Scale as well?

Do you have an LSA used for testing?
Even a script?

c_schmitz

c_schmitz

2026-10-09 16:46

administrator   ~86283

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

LimeBot

LimeBot

2026-10-13 11:50

administrator   ~86404

Fixed in Release 7.6.0+261013

Related Changesets

LimeSurvey: master 48b4f4ad

2026-10-09 16:46

c_schmitz


Details Diff
Fixed issue 18049: RemoteControl statistics export left out multiple numerical, multiple short text, array (numbers/text), dual scale and ranking questions
Dev Renamed createCompleteSGQA() to getStatisticsFieldNames(), old name kept as deprecated wrapper
Affected Issues
18049
mod - application/helpers/common_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - tests/unit/helpers/GenerateSimpleStatisticsTest.php Diff File
add - tests/unit/helpers/StatisticsFieldNamesTest.php Diff File

Issue History

Date Modified Username Field Change
2022-04-25 15:13 probesys New Issue
2022-04-26 08:27 galads Assigned To => gabrieljenik
2022-04-26 08:27 galads Status new => assigned
2022-07-05 15:32 gabrieljenik Note Added: 70737
2022-07-05 15:32 gabrieljenik Bug heat 0 => 2
2022-07-05 15:32 gabrieljenik Assigned To gabrieljenik =>
2022-07-05 15:32 gabrieljenik Status assigned => acknowledged
2022-07-07 14:50 probesys Note Added: 70788
2022-07-07 14:50 probesys Bug heat 2 => 4
2022-07-11 14:22 gabrieljenik Note Added: 70848
2022-07-27 22:28 gabrieljenik Note Added: 71203
2022-07-27 22:29 gabrieljenik Assigned To => gabrieljenik
2022-07-27 22:29 gabrieljenik Status acknowledged => feedback
2026-10-09 16:46 c_schmitz Changeset attached => LimeSurvey master 48b4f4ad
2026-10-09 16:46 c_schmitz Note Added: 86283
2026-10-09 16:46 c_schmitz Assigned To gabrieljenik => c_schmitz
2026-10-09 16:46 c_schmitz Status feedback => resolved
2026-10-09 16:46 c_schmitz Resolution open => fixed
2026-10-09 16:46 c_schmitz Bug heat 4 => 6
2026-10-13 11:50 LimeBot Note Added: 86404
2026-10-13 11:50 LimeBot Status resolved => closed
2026-10-13 11:50 LimeBot Bug heat 6 => 8