View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
10006Bug reportsImport/Exportpublic2017-03-01 01:02
Reporterelisa Assigned Toc_schmitz  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.50.x 
Summary10006: SPSS export - variables are reordered when groups are randomized
Description

When some of question groups are randomized the final variable order in *.sps syntax file seems to be randomized as well. For example I have 5 groups: A, B, C, D and E and the groups are randomized. The expected order of variables is the same as in the questionnaire: A1, A2..., B1, B2..., C1, C2 etc. However, sometimes the order of variables in syntax file is different. Below there is the example - I show "RENAME" lines of the syntax because they illustrate better the order of variables. The order of variables in SPSS file is C, A, D, E, B instead of A, B, C, D, E. The order of other groups is correct. Only the randomized groups are reordered. The order of variables for the same survey in Excel file is correct.

This does not happen for every survey with random groups and I cannot tell what is the rule.

This is not a new issue but I was not sure if this is only a single occurrence.

Additional Information

The example part of the syntax file (the lsa file attached):

RENAME VARIABLE ( V30 = C1_1 ).
RENAME VARIABLE ( V31 = C1_2 ).
RENAME VARIABLE ( V32 = C1_3 ).
RENAME VARIABLE ( V33 = C1_4 ).
RENAME VARIABLE ( V34 = C1_5 ).
RENAME VARIABLE ( V35 = C1_6 ).
RENAME VARIABLE ( V36 = C1_7 ).
RENAME VARIABLE ( V37 = C2 ).
RENAME VARIABLE ( V38 = C3 ).
RENAME VARIABLE ( V39 = A1_1 ).
RENAME VARIABLE ( V40 = A1_2 ).
RENAME VARIABLE ( V41 = A1_3 ).
RENAME VARIABLE ( V42 = A1_4 ).
RENAME VARIABLE ( V43 = A1_5 ).
RENAME VARIABLE ( V44 = A1_6 ).
RENAME VARIABLE ( V45 = A1_7 ).
RENAME VARIABLE ( V46 = A2 ).
RENAME VARIABLE ( V47 = A3 ).
RENAME VARIABLE ( V48 = D1_1 ).
RENAME VARIABLE ( V49 = D1_2 ).
RENAME VARIABLE ( V50 = D1_3 ).
RENAME VARIABLE ( V51 = D1_4 ).
RENAME VARIABLE ( V52 = D1_5 ).
RENAME VARIABLE ( V53 = D1_6 ).
RENAME VARIABLE ( V54 = D1_7 ).
RENAME VARIABLE ( V55 = D2 ).
RENAME VARIABLE ( V56 = D3 ).
RENAME VARIABLE ( V57 = E1_1 ).
RENAME VARIABLE ( V58 = E1_2 ).
RENAME VARIABLE ( V59 = E1_3 ).
RENAME VARIABLE ( V60 = E1_4 ).
RENAME VARIABLE ( V61 = E1_5 ).
RENAME VARIABLE ( V62 = E1_6 ).
RENAME VARIABLE ( V63 = E1_7 ).
RENAME VARIABLE ( V64 = E2 ).
RENAME VARIABLE ( V65 = E3 ).
RENAME VARIABLE ( V66 = B1_1 ).
RENAME VARIABLE ( V67 = B1_2 ).
RENAME VARIABLE ( V68 = B1_3 ).
RENAME VARIABLE ( V69 = B1_4 ).
RENAME VARIABLE ( V70 = B1_5 ).
RENAME VARIABLE ( V71 = B1_6 ).
RENAME VARIABLE ( V72 = B1_7 ).
RENAME VARIABLE ( V73 = B2 ).
RENAME VARIABLE ( V74 = B3 ).

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)151018
I will donate to the project if issue is resolvedNo
Browser
Database type & version--
Server OS (if known)Linux
Webserver software & version (if known)--
PHP Version5.3.29-1~dotdeb.0

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2015-10-30 13:09

developer   ~33465

I have to do some test : but i think we have the same behaviour on CSV export .

Happen if you start survey and export it after.

Can you try to "unconnect" , reconnect and try again ?

elisa

elisa

2015-10-30 14:20

developer   ~33469

I'm not sure what you mean by "unconnect". I expired the survey and activate again. The behaviour is the same - variables are reordered.

DenisChenu

DenisChenu

2015-11-02 17:27

developer   ~33489

Last edited: 2015-11-02 17:34

I mean : unlog of the admin page.

Or : close the browser, and trye again.

I really think it's a session issue, but WE have to fix it too.

PS: trying with and without starting survey : no change on SPSS syntax....

Can you upload your SPSS syntax ?

elisa

elisa

2015-11-02 21:14

developer   ~33492

Really strange. I checked it with another computer and I have the same behaviour - wrong order. I attached the syntax.

elisa

elisa

2015-11-02 21:23

developer   ~33493

I imported the survey from the attached .lsa file and exported syntax - the same result as yours - the variables are in the expected correct order.

DenisChenu

DenisChenu

2015-11-03 08:25

developer   ~33494

Maybe ? Disorder at survey table creation make the disorder ?
Can you have look at your DB or not ?

elisa

elisa

2015-11-03 09:21

developer   ~33497

I have access to the DB but my knowledge about it is very limited. I exported and uploaded two tables: data and timing.

c_schmitz

c_schmitz

2016-08-25 10:44

administrator   ~40481

From the dump it looks like the response table is already in the 'wrong' order.

c_schmitz

c_schmitz

2016-08-25 11:20

administrator   ~40482

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

c_schmitz

c_schmitz

2016-08-29 12:38

administrator   ~40540

Version 2.51.0 Build 160829 released

Related Changesets

LimeSurvey: master 75ffda35

2016-08-25 11:19

c_schmitz


Details Diff
Fixed issue 10006: Variables are in the wrong order when exporting to SPSS/R Affected Issues
10006
mod - application/helpers/export_helper.php Diff File
mod - application/views/admin/export/spss_view.php Diff File

Issue History

Date Modified Username Field Change
2015-10-29 15:42 elisa New Issue
2015-10-29 15:42 elisa File Added: survey_archive_847647.lsa
2015-10-30 13:09 DenisChenu Note Added: 33465
2015-10-30 14:20 elisa Note Added: 33469
2015-11-02 17:27 DenisChenu Note Added: 33489
2015-11-02 17:30 DenisChenu File Added: survey_847647_SPSS_syntax_file-WITHOUTSTARTSURVEY.sps
2015-11-02 17:34 DenisChenu Note Edited: 33489
2015-11-02 21:10 elisa File Added: survey_847647_SPSS_syntax_file.sps
2015-11-02 21:14 elisa Note Added: 33492
2015-11-02 21:23 elisa Note Added: 33493
2015-11-03 08:25 DenisChenu Note Added: 33494
2015-11-03 09:17 elisa File Added: lime_survey_847647.sql
2015-11-03 09:17 elisa File Added: lime_survey_847647_timings.sql
2015-11-03 09:21 elisa Note Added: 33497
2016-08-25 10:44 c_schmitz Note Added: 40481
2016-08-25 11:18 c_schmitz Assigned To => c_schmitz
2016-08-25 11:18 c_schmitz Status new => assigned
2016-08-25 11:20 c_schmitz Changeset attached => LimeSurvey master 75ffda35
2016-08-25 11:20 c_schmitz Note Added: 40482
2016-08-25 11:20 c_schmitz Resolution open => fixed
2016-08-25 11:20 c_schmitz Status assigned => resolved
2016-08-25 11:20 c_schmitz Fixed in Version => 2.50.x
2016-08-29 12:38 c_schmitz Note Added: 40540
2016-08-29 12:38 c_schmitz Status resolved => closed
2017-03-01 01:01 c_schmitz File Deleted: lime_survey_847647_timings.sql
2017-03-01 01:01 c_schmitz File Deleted: survey_847647_SPSS_syntax_file.sps
2017-03-01 01:01 c_schmitz File Deleted: lime_survey_847647.sql
2017-03-01 01:01 c_schmitz File Deleted: survey_archive_847647.lsa
2017-03-01 01:01 c_schmitz File Deleted: survey_847647_SPSS_syntax_file-WITHOUTSTARTSURVEY.sps
2017-03-01 01:02 c_schmitz View Status private => public