View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
15835Bug reportsStatisticspublic2020-02-12 11:16
ReporterJelle_S Assigned To 
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.1.1 
Summary15835: Responses missing from export
Description

When exporting statistics to Excel, Csv, ... answers from certain array types are missing (question type F, possibly also question type H). From what I can tell, the bug is located at https://github.com/LimeSurvey/LimeSurvey/blob/4.1.0+200128/application/helpers/admin/export/SurveyObj.php#L240

It seems that the $answers array there is already populated with the answer labels (already translated in the selected language). I'm not sure if there are any other code paths where this isn't the case, so I didn't make a PR and decided to report it here in stead. But it seems to me the code

$fullAnswer = (isset($answers[$answerCode])) ? $answers[$answerCode]->answerL10ns[$sLanguageCode]->answer : "";

can be simplified to

$fullAnswer = (isset($answers[$answerCode])) ? $answers[$answerCode] : "";

Steps To Reproduce

Create a survey with a question (question type F).
Add answers to the question (in multiple languages?)
Fill in the survey
Export the statistics (with long answers, not short)

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)4.1.1+200203
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmariadb Ver 15.1 Distrib 10.1.43-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2, DB version 425
Server OS (if known)
Webserver software & version (if known)
PHP VersionPHP 7.2.24-0ubuntu0.18.04.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

Jelle_S

Jelle_S

2020-02-07 13:31

reporter   ~55806

I went ahead and created a PR anyway :)

DenisChenu

DenisChenu

2020-02-10 10:21

developer   ~55818

You can send a quick sample lsa ? Working with the fix, not working without ?

Thank you for your work ! Really great!

Jelle_S

Jelle_S

2020-02-11 11:25

reporter   ~55855

@DenisChenu .lsa attached below

DenisChenu

DenisChenu

2020-02-11 11:56

developer   ~55856

Thank you :)

guest

guest

2020-02-11 14:02

viewer   ~55859

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

lime_release_bot

lime_release_bot

2020-02-12 11:16

administrator   ~55883

Fixed in Release 4.1.3+200213

Related Changesets

LimeSurvey: master 6cd46149

2020-02-11 14:02:49

Jelle_S


Committer: GitHub Details Diff
Fixed issue 15835: Answers were already translated when loading them for export. (#1386) Affected Issues
15835
mod - application/helpers/admin/export/SurveyObj.php Diff File

Issue History

Date Modified Username Field Change
2020-02-07 11:32 Jelle_S New Issue
2020-02-07 13:31 Jelle_S Note Added: 55806
2020-02-10 10:21 DenisChenu Note Added: 55818
2020-02-11 11:25 Jelle_S File Added: survey_archive_573272.lsa
2020-02-11 11:25 Jelle_S Note Added: 55855
2020-02-11 11:56 DenisChenu Note Added: 55856
2020-02-11 14:02 Jelle_S Changeset attached => LimeSurvey master 6cd46149
2020-02-11 14:02 guest Note Added: 55859
2020-02-12 11:16 lime_release_bot Note Added: 55883
2020-02-12 11:16 lime_release_bot Status new => closed
2020-02-12 11:16 lime_release_bot Resolution open => fixed