View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
08125 | Bug reports | Import/Export | public | 2013-09-03 14:55 | 2014-01-31 17:32 |
Reporter | petert | Assigned To | mfaber | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00+ | ||||
Target Version | 2.05+ | Fixed in Version | 2.05+ | ||
Summary | 08125: SPSS Export SDATE Date Problem | ||||
Description | mdekkor directed me to file a bug report about this issue: | ||||
Steps To Reproduce | Use attached .lss file. Export to SPSS. Notice the difference in the date variable declarations between DATETIME23.2 which works for submitdate etc, and SDATE which does not work on my clients SPSS version. Asking them (government agency) to upgrade or troubleshoot SPSS isn't not a viable option. Notice that date format and structure in the DB are identical per forum screenshots. | ||||
Tags | No tags attached. | ||||
Attached Files | limesurvey_survey_617976.lss.xml (15,500 bytes)
<?xml version="1.0" encoding="UTF-8"?> <document> <LimeSurveyDocType>Survey</LimeSurveyDocType> <DBVersion>164</DBVersion> <languages> <language>en</language> </languages> <answers> <fields> <fieldname>qid</fieldname> <fieldname>code</fieldname> <fieldname>answer</fieldname> <fieldname>assessment_value</fieldname> <fieldname>sortorder</fieldname> <fieldname>language</fieldname> <fieldname>scale_id</fieldname> </fields> <rows> <row> <qid><![CDATA[3418]]></qid> <code><![CDATA[1]]></code> <answer><![CDATA[Yes]]></answer> <assessment_value><![CDATA[0]]></assessment_value> <sortorder><![CDATA[1]]></sortorder> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> </row> <row> <qid><![CDATA[3418]]></qid> <code><![CDATA[2]]></code> <answer><![CDATA[No ]]></answer> <assessment_value><![CDATA[1]]></assessment_value> <sortorder><![CDATA[2]]></sortorder> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> </row> </rows> </answers> <groups> <fields> <fieldname>gid</fieldname> <fieldname>sid</fieldname> <fieldname>group_name</fieldname> <fieldname>group_order</fieldname> <fieldname>description</fieldname> <fieldname>language</fieldname> <fieldname>randomization_group</fieldname> <fieldname>grelevance</fieldname> </fields> <rows> <row> <gid><![CDATA[218]]></gid> <sid><![CDATA[617976]]></sid> <group_name><![CDATA[First Group]]></group_name> <group_order><![CDATA[18]]></group_order> <description/> <language><![CDATA[en]]></language> <randomization_group/> <grelevance/> </row> </rows> </groups> <questions> <fields> <fieldname>qid</fieldname> <fieldname>parent_qid</fieldname> <fieldname>sid</fieldname> <fieldname>gid</fieldname> <fieldname>type</fieldname> <fieldname>title</fieldname> <fieldname>question</fieldname> <fieldname>preg</fieldname> <fieldname>help</fieldname> <fieldname>other</fieldname> <fieldname>mandatory</fieldname> <fieldname>question_order</fieldname> <fieldname>language</fieldname> <fieldname>scale_id</fieldname> <fieldname>same_default</fieldname> <fieldname>relevance</fieldname> </fields> <rows> <row> <qid><![CDATA[3418]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[617976]]></sid> <gid><![CDATA[218]]></gid> <type><![CDATA[L]]></type> <title><![CDATA[multiOpt1]]></title> <question><![CDATA[Have you lived here your whole life?]]></question> <preg/> <help/> <other><![CDATA[N]]></other> <mandatory><![CDATA[Y]]></mandatory> <question_order><![CDATA[1]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> </row> <row> <qid><![CDATA[3419]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[617976]]></sid> <gid><![CDATA[218]]></gid> <type><![CDATA[Q]]></type> <title><![CDATA[address1]]></title> <question><![CDATA[First address (18-25)]]></question> <preg/> <help/> <other><![CDATA[N]]></other> <mandatory><![CDATA[Y]]></mandatory> <question_order><![CDATA[2]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> </row> <row> <qid><![CDATA[3433]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[617976]]></sid> <gid><![CDATA[218]]></gid> <type><![CDATA[D]]></type> <title><![CDATA[DateComp]]></title> <question><![CDATA[What date was the paper survey completed]]></question> <preg/> <help/> <other><![CDATA[N]]></other> <mandatory><![CDATA[Y]]></mandatory> <question_order><![CDATA[4]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> </row> </rows> </questions> <subquestions> <fields> <fieldname>qid</fieldname> <fieldname>parent_qid</fieldname> <fieldname>sid</fieldname> <fieldname>gid</fieldname> <fieldname>type</fieldname> <fieldname>title</fieldname> <fieldname>question</fieldname> <fieldname>preg</fieldname> <fieldname>help</fieldname> <fieldname>other</fieldname> <fieldname>mandatory</fieldname> <fieldname>question_order</fieldname> <fieldname>language</fieldname> <fieldname>scale_id</fieldname> <fieldname>same_default</fieldname> <fieldname>relevance</fieldname> </fields> <rows> <row> <qid><![CDATA[3420]]></qid> <parent_qid><![CDATA[3419]]></parent_qid> <sid><![CDATA[617976]]></sid> <gid><![CDATA[218]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[city]]></title> <question><![CDATA[City]]></question> <other><![CDATA[N]]></other> <question_order><![CDATA[1]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> </row> </rows> </subquestions> <question_attributes> <fields> <fieldname>qid</fieldname> <fieldname>attribute</fieldname> <fieldname>value</fieldname> <fieldname>language</fieldname> </fields> <rows> <row> <qid><![CDATA[3419]]></qid> <attribute><![CDATA[statistics_showgraph]]></attribute> <value><![CDATA[1]]></value> </row> <row> <qid><![CDATA[3433]]></qid> <attribute><![CDATA[date_format]]></attribute> <value><![CDATA[dd.mm.yyyy]]></value> </row> </rows> </question_attributes> <surveys> <fields> <fieldname>sid</fieldname> <fieldname>admin</fieldname> <fieldname>expires</fieldname> <fieldname>startdate</fieldname> <fieldname>adminemail</fieldname> <fieldname>anonymized</fieldname> <fieldname>faxto</fieldname> <fieldname>format</fieldname> <fieldname>savetimings</fieldname> <fieldname>template</fieldname> <fieldname>language</fieldname> <fieldname>additional_languages</fieldname> <fieldname>datestamp</fieldname> <fieldname>usecookie</fieldname> <fieldname>allowregister</fieldname> <fieldname>allowsave</fieldname> <fieldname>autonumber_start</fieldname> <fieldname>autoredirect</fieldname> <fieldname>allowprev</fieldname> <fieldname>printanswers</fieldname> <fieldname>ipaddr</fieldname> <fieldname>refurl</fieldname> <fieldname>publicstatistics</fieldname> <fieldname>publicgraphs</fieldname> <fieldname>listpublic</fieldname> <fieldname>htmlemail</fieldname> <fieldname>tokenanswerspersistence</fieldname> <fieldname>assessments</fieldname> <fieldname>usecaptcha</fieldname> <fieldname>usetokens</fieldname> <fieldname>bounce_email</fieldname> <fieldname>attributedescriptions</fieldname> <fieldname>emailresponseto</fieldname> <fieldname>emailnotificationto</fieldname> <fieldname>tokenlength</fieldname> <fieldname>showxquestions</fieldname> <fieldname>showgroupinfo</fieldname> <fieldname>shownoanswer</fieldname> <fieldname>showqnumcode</fieldname> <fieldname>bouncetime</fieldname> <fieldname>bounceprocessing</fieldname> <fieldname>bounceaccounttype</fieldname> <fieldname>bounceaccounthost</fieldname> <fieldname>bounceaccountpass</fieldname> <fieldname>bounceaccountencryption</fieldname> <fieldname>bounceaccountuser</fieldname> <fieldname>showwelcome</fieldname> <fieldname>showprogress</fieldname> <fieldname>allowjumps</fieldname> <fieldname>navigationdelay</fieldname> <fieldname>nokeyboard</fieldname> <fieldname>alloweditaftercompletion</fieldname> <fieldname>googleanalyticsstyle</fieldname> <fieldname>googleanalyticsapikey</fieldname> <fieldname>sendconfirmation</fieldname> </fields> <rows> <row> <sid><![CDATA[617976]]></sid> <admin/> <adminemail/> <anonymized><![CDATA[N]]></anonymized> <faxto/> <format><![CDATA[G]]></format> <savetimings><![CDATA[N]]></savetimings> <template><![CDATA[parkinsons2]]></template> <language><![CDATA[en]]></language> <additional_languages/> <datestamp><![CDATA[Y]]></datestamp> <usecookie><![CDATA[N]]></usecookie> <allowregister><![CDATA[N]]></allowregister> <allowsave><![CDATA[Y]]></allowsave> <autonumber_start><![CDATA[5]]></autonumber_start> <autoredirect><![CDATA[N]]></autoredirect> <allowprev><![CDATA[N]]></allowprev> <printanswers><![CDATA[N]]></printanswers> <ipaddr><![CDATA[Y]]></ipaddr> <refurl><![CDATA[N]]></refurl> <publicstatistics><![CDATA[N]]></publicstatistics> <publicgraphs><![CDATA[N]]></publicgraphs> <listpublic><![CDATA[N]]></listpublic> <htmlemail><![CDATA[Y]]></htmlemail> <tokenanswerspersistence><![CDATA[N]]></tokenanswerspersistence> <assessments><![CDATA[N]]></assessments> <usecaptcha><![CDATA[D]]></usecaptcha> <usetokens><![CDATA[N]]></usetokens> <bounce_email/> <attributedescriptions><![CDATA[a:0:{}]]></attributedescriptions> <emailresponseto/> <emailnotificationto/> <tokenlength><![CDATA[15]]></tokenlength> <showxquestions><![CDATA[Y]]></showxquestions> <showgroupinfo><![CDATA[B]]></showgroupinfo> <shownoanswer><![CDATA[Y]]></shownoanswer> <showqnumcode><![CDATA[X]]></showqnumcode> <bounceprocessing><![CDATA[N]]></bounceprocessing> <showwelcome><![CDATA[Y]]></showwelcome> <showprogress><![CDATA[Y]]></showprogress> <allowjumps><![CDATA[N]]></allowjumps> <navigationdelay><![CDATA[0]]></navigationdelay> <nokeyboard><![CDATA[N]]></nokeyboard> <alloweditaftercompletion><![CDATA[N]]></alloweditaftercompletion> <googleanalyticsstyle><![CDATA[0]]></googleanalyticsstyle> <googleanalyticsapikey/> <sendconfirmation><![CDATA[Y]]></sendconfirmation> </row> </rows> </surveys> <surveys_languagesettings> <fields> <fieldname>surveyls_survey_id</fieldname> <fieldname>surveyls_language</fieldname> <fieldname>surveyls_title</fieldname> <fieldname>surveyls_description</fieldname> <fieldname>surveyls_welcometext</fieldname> <fieldname>surveyls_endtext</fieldname> <fieldname>surveyls_url</fieldname> <fieldname>surveyls_urldescription</fieldname> <fieldname>surveyls_email_invite_subj</fieldname> <fieldname>surveyls_email_invite</fieldname> <fieldname>surveyls_email_remind_subj</fieldname> <fieldname>surveyls_email_remind</fieldname> <fieldname>surveyls_email_register_subj</fieldname> <fieldname>surveyls_email_register</fieldname> <fieldname>surveyls_email_confirm_subj</fieldname> <fieldname>surveyls_email_confirm</fieldname> <fieldname>surveyls_dateformat</fieldname> <fieldname>email_admin_notification_subj</fieldname> <fieldname>email_admin_notification</fieldname> <fieldname>email_admin_responses_subj</fieldname> <fieldname>email_admin_responses</fieldname> <fieldname>surveyls_numberformat</fieldname> <fieldname>surveyls_attributecaptions</fieldname> </fields> <rows> <row> <surveyls_survey_id><![CDATA[617976]]></surveyls_survey_id> <surveyls_language><![CDATA[en]]></surveyls_language> <surveyls_title><![CDATA[Residential Test]]></surveyls_title> <surveyls_description/> <surveyls_welcometext/> <surveyls_endtext/> <surveyls_url/> <surveyls_urldescription/> <surveyls_email_invite_subj><![CDATA[Invitation to participate in a survey]]></surveyls_email_invite_subj> <surveyls_email_invite><![CDATA[Dear {FIRSTNAME}, you have been invited to participate in a survey. The survey is titled: "{SURVEYNAME}" "{SURVEYDESCRIPTION}" To participate, please click on the link below. Sincerely, {ADMINNAME} ({ADMINEMAIL}) ---------------------------------------------- Click here to do the survey: {SURVEYURL} If you do not want to participate in this survey and don't want to receive any more invitations please click the following link: {OPTOUTURL} If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link: {OPTINURL}]]></surveyls_email_invite> <surveyls_email_remind_subj><![CDATA[Reminder to participate in a survey]]></surveyls_email_remind_subj> <surveyls_email_remind><![CDATA[Dear {FIRSTNAME}, Recently we invited you to participate in a survey. We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part. The survey is titled: "{SURVEYNAME}" "{SURVEYDESCRIPTION}" To participate, please click on the link below. Sincerely, {ADMINNAME} ({ADMINEMAIL}) ---------------------------------------------- Click here to do the survey: {SURVEYURL} If you do not want to participate in this survey and don't want to receive any more invitations please click the following link: {OPTOUTURL}]]></surveyls_email_remind> <surveyls_email_register_subj><![CDATA[Survey registration confirmation]]></surveyls_email_register_subj> <surveyls_email_register><![CDATA[Dear {FIRSTNAME}, You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}. To complete this survey, click on the following URL: {SURVEYURL} If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.]]></surveyls_email_register> <surveyls_email_confirm_subj><![CDATA[Confirmation of your participation in our survey]]></surveyls_email_confirm_subj> <surveyls_email_confirm><![CDATA[Dear {FIRSTNAME}, this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating. If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}. Sincerely, {ADMINNAME}]]></surveyls_email_confirm> <surveyls_dateformat><![CDATA[12]]></surveyls_dateformat> <email_admin_notification_subj><![CDATA[Response submission for survey {SURVEYNAME}]]></email_admin_notification_subj> <email_admin_notification><![CDATA[Hello, A new response was submitted for your survey '{SURVEYNAME}'. Click the following link to reload the survey: {RELOADURL} Click the following link to see the individual response: {VIEWRESPONSEURL} Click the following link to edit the individual response: {EDITRESPONSEURL} View statistics by clicking here: {STATISTICSURL}]]></email_admin_notification> <email_admin_responses_subj><![CDATA[Response submission for survey {SURVEYNAME} with results]]></email_admin_responses_subj> <email_admin_responses><![CDATA[Hello, A new response was submitted for your survey '{SURVEYNAME}'. Click the following link to reload the survey: {RELOADURL} Click the following link to see the individual response: {VIEWRESPONSEURL} Click the following link to edit the individual response: {EDITRESPONSEURL} View statistics by clicking here: {STATISTICSURL} The following answers were given by the participant: {ANSWERTABLE}]]></email_admin_responses> <surveyls_numberformat><![CDATA[0]]></surveyls_numberformat> <surveyls_attributecaptions><![CDATA[a:0:{}]]></surveyls_attributecaptions> </row> </rows> </surveys_languagesettings> </document> | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 130802 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mysql 5.0.96 | ||||
Server OS (if known) | linux | ||||
Webserver software & version (if known) | apache 2 | ||||
PHP Version | 5.2.4-2ubuntu5.25 | ||||
Thanks for the report. I will investigate the changes and update the spss export. |
|
Menno, what's the target version for this fix? |
|
This needs to go into 2.05, not fixing it for 2.00+ SDATE does not accept time while DATETIME expects a different order: This needs to be carefully changed and will be addressed when SPSS is ported to the result export plugin system. |
|
Maybe this is related to date question now having time? If you could post here what attributes handle this i can see how to fix export to spss (as date is different from datestamp) |
|
mdekker: there was no change to the structure of the format in the date/time question. Had a look at the code and to me it seems that the conversion for date/time answers is missing. SPSS-type for these variables is SDATE but conversion to SPSS-dateformat only is applied to variables with spss-type DATETIME23.2 starting line 121 in exporthelper: [code] Now if you have a look at line 344, where the SPSS-type for the date/time question is assigned, you'll notice its size 19 and SDATE, which DOES not go through conversion. [code] As the date/time question can also be used to create times, I would recommend to change this type to datetime23.2. (whatever 23.2 means) So then these date/time question dates should be properly converted to spss format and the full timestamps (e.g. 23-12-2013 18:00) are supported as well. |
|
Hey Menno, |
|
Could you please apply the fix? I can help to test a little if you like. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13727 |
|
mdekker, just committed a fix to master. If you could test it would be really helpful as I do not have SPSS myself. Thanks, M |
|
Will try to check it out later today, sorry for the delay |
|
No worries, mdekker… |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13797 |
|
Just added a line to disable log output, works perfect for me. Thanks mfaber! |
|
LimeSurvey 2-05+ Build 140131 released |
|
LimeSurvey: master 9a0923fb 2014-01-20 11:39 Committer: mfaber Details Diff |
Fixed issue 08125: Wrong SPSS date format for date question results Dev: All date/time question results are exported as a Dev: full timestamp (yyyy-mm-dd hh:mm:ss). Dev: May add differential treatment of dates/times/datetimes Dev: (SPSS: SDATE vs. TIMEw vs. DATEw, etc...) |
Affected Issues 08125 |
|
mod - application/helpers/export_helper.php | Diff File | ||
LimeSurvey: master 0048972b 2014-01-28 11:00 Details Diff |
Fixed 08125: SPSS Export SDATE Date Problem dev: added disablehtmllogging so syntax and data are clean |
Affected Issues 08125 |
|
mod - application/controllers/admin/export.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-03 14:55 | petert | New Issue | |
2013-09-03 14:55 | petert | File Added: limesurvey_survey_617976.lss.xml | |
2013-09-05 11:58 | Mazi | Assigned To | => mdekker |
2013-09-05 11:58 | Mazi | Status | new => assigned |
2013-09-05 12:30 | mdekker | Note Added: 26160 | |
2013-10-07 13:44 | c_schmitz | Note Added: 26580 | |
2013-10-07 14:09 | mdekker | Note Added: 26584 | |
2013-10-07 14:09 | mdekker | Target Version | => 2.05 RC |
2013-10-08 14:48 | mdekker | Note Added: 26624 | |
2013-10-08 14:48 | mdekker | Assigned To | mdekker => mfaber |
2013-10-08 14:48 | mdekker | Status | assigned => feedback |
2013-10-08 15:52 | mfaber | Note Added: 26628 | |
2013-10-08 15:54 | mfaber | Issue Monitored: mfaber | |
2013-10-08 15:55 | mfaber | Assigned To | mfaber => mdekker |
2013-10-08 15:55 | mfaber | Status | feedback => assigned |
2014-01-11 09:30 | mfaber | Note Added: 27833 | |
2014-01-20 10:37 | mdekker | Note Added: 28021 | |
2014-01-20 11:40 | mfaber | Changeset attached | => LimeSurvey master 9a0923fb |
2014-01-20 11:40 | mfaber | Note Added: 28023 | |
2014-01-20 11:40 | mfaber | Assigned To | mdekker => mfaber |
2014-01-20 11:40 | mfaber | Resolution | open => fixed |
2014-01-20 11:42 | mfaber | Note Added: 28024 | |
2014-01-21 16:05 | mfaber | Assigned To | mfaber => mdekker |
2014-01-21 16:05 | mfaber | Status | assigned => feedback |
2014-01-21 16:05 | mfaber | Target Version | 2.05 RC => 2.05+ |
2014-01-28 08:44 | mdekker | Note Added: 28241 | |
2014-01-28 09:46 | mfaber | Note Added: 28243 | |
2014-01-28 11:00 | mdekker | Changeset attached | => LimeSurvey master 0048972b |
2014-01-28 11:00 | mdekker | Note Added: 28249 | |
2014-01-28 11:01 | mdekker | Note Added: 28250 | |
2014-01-28 11:01 | mdekker | Status | feedback => resolved |
2014-01-28 11:01 | mdekker | Fixed in Version | => 2.05+ |
2014-01-28 11:01 | mdekker | Assigned To | mdekker => mfaber |
2014-01-31 17:32 | c_schmitz | Note Added: 28346 | |
2014-01-31 17:32 | c_schmitz | Status | resolved => closed |
2021-08-05 00:44 | guest | Bug heat | 6 => 8 |