View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
11983Feature requestsImport/Exportpublic2016-12-07 14:52
Reporterdondirko Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary11983: SPSS syntax export, reducing unnecessary code
Description

The generated SPSS syntax uses standard names (V1, V2 ... Vx) to let SPSS import the answers into SPSS variables via the GET procedure. User defined question names will be ignored here. Afterwards the standard variable names will renamed via the RENAME procedure of SPSS. This lead to a lot of unnecessary code and a confusing program structure.

Suggestion:
If the user has defined question names within LimeSurvey they should be used in the SPSS syntax from the beginning on. Then you don't need the RENAME command any more and get much more clarity.

Additional Information

Example with my var names:

GET DATA
/TYPE=TXT /FILE='my_raw_data.dat' /DELCASE=LINE /DELIMITERS="," /QUALIFIER="'"
/ARRANGEMENT=DELIMITED /FIRSTCASE=1 /IMPORTCASE=ALL
/VARIABLES=
MyVarName1 F7
MyVarNameX DATETIME23.2 .

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

Users monitoring this issue

mdekker

Activities

Mazi

Mazi

2016-12-07 11:45

updater   ~42433

This sounds like a reasonable suggestion. Let's wait for some feedback from our SPSS experts and then we can check if this can be an additional export setting at a next major release.

DenisChenu

DenisChenu

2016-12-07 11:50

developer   ~42434

Remind : old survey can have same question title. Only survey created after 2.05 or 2.06 are OK with this.

Seems unnecessary code is here for compatibility.

tammo

tammo

2016-12-07 14:07

partner   ~42440

Since 2.05/2.06 is the lowest version that we still support, I think the request is reasonable. We do not have to keep compatibility with SPSS export from earlier versions.

DenisChenu

DenisChenu

2016-12-07 14:40

developer   ~42442

Survey (activated) can come from 1.80, updated, updated, updated ......

It's not exactly the same then 'template update' if we broke an actvated survey.

But OK : here : why not , break is survey is 'not ok' , there are a test for unicity of code : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/admin/export.php#L685

mdekker

mdekker

2016-12-07 14:45

reporter   ~42443

I think old surveys can still have incompatible names. So when doing the export you should check if that is the case. If so, use the rename method, or create a new and valid name live the Vxxx for those fields.

Also, it could be that variable names are not compatible with spss rules. Probably not the case for new surveys, but ones that were created in older versions can have that problem.

I think the request does not really solve a problem, it just creates new problems. Current code creates the exports, always, and tries to rename when possible. Result is for incompatible or duplicate names they keep the Vxxx name but data is there. When you change this result could be no output at all.

DenisChenu

DenisChenu

2016-12-07 14:52

developer   ~42445

+1 : improve the code is always a good thing BUT improve a code with removing feature is always a bad things. This should only be done if necessary.

Issue History

Date Modified Username Field Change
2016-12-07 11:01 dondirko New Issue
2016-12-07 11:45 Mazi Note Added: 42433
2016-12-07 11:47 Mazi Issue Monitored: mdekker
2016-12-07 11:50 DenisChenu Note Added: 42434
2016-12-07 14:07 tammo Note Added: 42440
2016-12-07 14:40 DenisChenu Note Added: 42442
2016-12-07 14:45 mdekker Note Added: 42443
2016-12-07 14:52 DenisChenu Note Added: 42445