View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08225Feature requestsImport/Exportpublic2014-02-27 15:11
Reporterabezverkhyy Assigned Toabezverkhyy  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Summary08225: Enable LS to import/export answers (.vv) between different installations and versions
Description

After the following bug
http://bugs.limesurvey.org/view.php?id=5740
was resolved, the VV import/export system became very evolved as it matches and maps column headers between source CSV and destination table.

The only problem is that question codes used for column names are dependent on a particular installation of LS, therefore exporting answers from one installation and importing to another doesn't work (answers are empty). The user has to manually edit csv files to match destination question codes, which is unnatural.

A very simple solution, when question codes don't match, is to map source questions to destination questions in the order in which they appear in the CSV file.

In this way, if codes don't match, instead of being empty, the answers are imported as expected without any manual intervention on vv files.

I implemented this solution here :
https://github.com/LimeSurvey/LimeSurvey/pull/138

TagsNo tags attached.
Bug heat6
Story point estimate
Users affected %

Users monitoring this issue

mfaber

Activities

DenisChenu

DenisChenu

2013-10-02 18:31

developer   ~26483

<q>The only problem is that question codes used for column names are dependent on a particular installation of LS, </q>

No, the question code are the same if the question code of each surevy are the same.

Tested

DenisChenu

DenisChenu

2013-10-02 18:32

developer   ~26484

And with your mapping you can broke survey ....

You can map a date to a text, a single choice to a multichoice etc ....

QCODE are same is OK.

abezverkhyy

abezverkhyy

2013-10-02 19:52

reporter   ~26489

@DenisChenu

<q> No, the question code are the same if the question code of each surevy are the same.</q>

I meant SGQA codes are different from one installation to another. Thus, for example, you can't import a vv file exported from LS 1.92 to LS 2.05 without manual editing.

<q> You can map a date to a text, a single choice to a multichoice etc .... </q>

This is wrong.

Please read my patch carefully :

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

Is uses a regexp to find columns with SGQA codes and maps them to the right place.

For example if your destination table is like (id, date, token, 42X42X1, 42X42X2) and the VV file is like (id, token, date, foo, bar, 43X44X1, 43X44X2), 42X42X1 will be mapped to 43X44X1, 42X42X2 to 43X44X2 etc. And that's what users are expecting when they export/import answers between different versions.

If you want to convince yourself have a look at :
http://bugs.limesurvey.org/view.php?id=5740
Import the attached lss file, then try to import the attached csv file. As result the imported answers will be empty. With my patch it works.

How can you be opposed to a patch that makes possible imports from older versions without manual editing ?

Issue History

Date Modified Username Field Change
2013-10-02 17:12 abezverkhyy New Issue
2013-10-02 18:06 mfaber Issue Monitored: mfaber
2013-10-02 18:31 DenisChenu Note Added: 26483
2013-10-02 18:32 DenisChenu Note Added: 26484
2013-10-02 18:32 DenisChenu Project Bug reports => Feature requests
2013-10-02 19:52 abezverkhyy Note Added: 26489
2014-02-27 15:11 DenisChenu Status new => closed
2014-02-27 15:11 DenisChenu Assigned To => abezverkhyy
2014-02-27 15:11 DenisChenu Resolution open => fixed
2014-02-27 15:11 DenisChenu Fixed in Version => 2.05+