View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
07885Bug reportsImport/Exportpublic2013-08-16 13:54
Reporterrowanc Assigned Tomdekker  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.05 RC 
Summary07885: Multiple issues with excel/tsv export and subsequent import
Description

1) When using a drop down list as a question, the export file duplicates the code/name of the element in the relevance column, which breaks the import

2) When using a text array, the x-axis duplicates the code/name in the relevance column, and the default code for the x-axis sub question is the same as the default for the y-axis - this breaks the import (primary key violation?).

Steps To Reproduce

1) Build survey, with dropdown or array, export to tsv
2) new survey, import from file / tsv
3) errors occur.

Additional Information

LSS example survey attached (tsv fails for this one, but I can only attach one file)

TagsNo tags attached.
Attached Files
limesurvey_survey_756269.txt (14,445 bytes)   
class	type/scale	name	relevance	text	help	language	validation	mandatory	other	default	same_default	allowed_filetypes	alphasort	answer_width	array_filter	array_filter_exclude	assessment_value	category_separator	display_columns	display_rows	dropdown_dates_year_min	dropdown_dates	dropdown_dates_year_max	dropdown_prefix	dropdown_prepostfix	dropdown_separators	dropdown_size	dualscale_headerA	dualscale_headerB	em_validation_q_tip	em_validation_q	em_validation_sq	em_validation_sq_tip	equals_num_value	exclude_all_others	exclude_all_others_auto	hidden	hide_tip	input_boxes	location_city	location_country	location_defaultcoordinates	location_mapheight	location_mapservice	location_mapwidth	location_mapzoom	location_nodefaultfromip	location_postal	location_state	max_answers	max_filesize	max_num_of_files	max_num_value	max_num_value_n	maximum_chars	min_answers	min_num_of_files	min_num_value	min_num_value_n	multiflexible_checkbox	multiflexible_max	multiflexible_min	multiflexible_step	num_value_int_only	numbers_only	other_comment_mandatory	other_numbers_only	other_replace_text	page_break	prefix	public_statistics	random_group	random_order	reverse	scale_export	show_comment	show_grand_total	show_title	show_totals	slider_accuracy	slider_default	slider_layout	slider_max	slider_middlestart	slider_min	slider_rating	slider_separator	slider_showminmax	suffix	text_input_width	time_limit_action	time_limit_countdown_message	time_limit_disable_next	time_limit_disable_prev	time_limit_message	time_limit_message_delay	time_limit_message_style	time_limit_timer_style	time_limit_warning_2_display_time	time_limit_warning_2_message	time_limit_warning_2_style	time_limit_warning_2	time_limit_warning	time_limit	time_limit_warning_display_time	time_limit_warning_message	time_limit_warning_style	use_dropdown
S		sid		756269																																																																																																								
S		owner_id		1																																																																																																								
S		admin		Administrator																																																																																																								
S		active		N																																																																																																								
S		adminemail		bob.smith@whatever.com																																																																																																								
S		anonymized		N																																																																																																								
S		format		G																																																																																																								
S		savetimings		N																																																																																																								
S		template		default																																																																																																								
S		language		en																																																																																																								
S		datestamp		N																																																																																																								
S		usecookie		N																																																																																																								
S		allowregister		N																																																																																																								
S		allowsave		Y																																																																																																								
S		autonumber_start		0																																																																																																								
S		autoredirect		N																																																																																																								
S		allowprev		N																																																																																																								
S		printanswers		N																																																																																																								
S		ipaddr		N																																																																																																								
S		refurl		N																																																																																																								
S		datecreated		2013-05-28																																																																																																								
S		publicstatistics		N																																																																																																								
S		publicgraphs		N																																																																																																								
S		listpublic		N																																																																																																								
S		htmlemail		Y																																																																																																								
S		sendconfirmation		Y																																																																																																								
S		tokenanswerspersistence		N																																																																																																								
S		assessments		N																																																																																																								
S		usecaptcha		D																																																																																																								
S		usetokens		N																																																																																																								
S		bounce_email		bob.smith@whatever.com																																																																																																								
S		attributedescriptions		a:0:{}																																																																																																								
S		tokenlength		15																																																																																																								
S		showxquestions		Y																																																																																																								
S		showgroupinfo		B																																																																																																								
S		shownoanswer		Y																																																																																																								
S		showqnumcode		X																																																																																																								
S		bounceprocessing		N																																																																																																								
S		showwelcome		Y																																																																																																								
S		showprogress		Y																																																																																																								
S		allowjumps		N																																																																																																								
S		navigationdelay		0																																																																																																								
S		nokeyboard		N																																																																																																								
S		alloweditaftercompletion		N																																																																																																								
SL		surveyls_title		DropDownTest		en																																																																																																						
SL		surveyls_description		Testing the export of dropdowns and arrays		en																																																																																																						
SL		surveyls_email_invite_subj		Invitation to participate in a survey		en																																																																																																						
SL		surveyls_email_invite		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}		en																																																																																																						
SL		surveyls_email_remind_subj		Reminder to participate in a survey		en																																																																																																						
SL		surveyls_email_remind		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}		en																																																																																																						
SL		surveyls_email_register_subj		Survey registration confirmation		en																																																																																																						
SL		surveyls_email_register		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}.		en																																																																																																						
SL		surveyls_email_confirm_subj		Confirmation of your participation in our survey		en																																																																																																						
SL		surveyls_email_confirm		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}		en																																																																																																						
SL		surveyls_dateformat		9		en																																																																																																						
SL		surveyls_attributecaptions		a:0:{}		en																																																																																																						
SL		email_admin_notification_subj		Response submission for survey {SURVEYNAME}		en																																																																																																						
SL		email_admin_notification		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}		en																																																																																																						
SL		email_admin_responses_subj		Response submission for survey {SURVEYNAME} with results		en																																																																																																						
SL		email_admin_responses		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}		en																																																																																																						
SL		surveyls_numberformat		0		en																																																																																																						
G		First Grop	1	The first group of questions		en																																																																																																						
Q	!	DropDown1	1	Select from the list		en			N		1																																																																																																	
A	0	A1	A1	Some example answer option		en																																																																																																						
A	0	A2	A2	New answer option		en																																																																																																						
A	0	A3	A3	Another answer option		en																																																																																																						
Q	!	DropDown2	1	Another dropdown, this time quick add.		en			N		1																																																																																																	
A	0	A1	A1	option 1		en																																																																																																						
A	0	A2	A2	Option 2		en																																																																																																						
A	0	A3	A3	Option 3		en																																																																																																						
Q	;	Array1	1	This should be an array text input		en			N		1																																																																																																	
SQ	0	SQ001		SideThingy1		en																																																																																																						
SQ	0	SQ002		SideThingy2		en																																																																																																						
SQ	0	SQ003		SideThingty3		en																																																																																																						
SQ	1	SQ001	SQ001	X-Scale Defaults to same sub question code SQ001 as y - this causes key error?		en																																																																																																						
limesurvey_survey_756269.txt (14,445 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)130406
I will donate to the project if issue is resolvedNo
Browserfirefox
Database type & versionMYSQL 5.5.27
Server OS (if known)Windows XP
Webserver software & version (if known)Apache/2.4.3 (Win32)
PHP Version PHP/5.4.7

Relationships

related to 07970 closedsammousa Duplicate question codes. 

Users monitoring this issue

mfaber

Activities

c_schmitz

c_schmitz

2013-06-02 17:54

administrator   ~25448

Please update to the latest 2.0 build and let us know if you still can reproduce the problems.

c_schmitz

c_schmitz

2013-06-14 14:59

administrator   ~25531

Feedback please?

mfaber

mfaber

2013-07-21 15:59

reporter   ~25819

In 2.05:
issue 1 does not not seem to be present anymore but I was able to confirm the second issue.
Like rowanc reported, the problem seems to be the same code being used on the X- and the Y-axis in a matrix question. If different codes are used, this question type exports and imports ok.

I think this revisits the discussion about enforcing unique variable names (codes) which should be implemented for 2.05.
Also to avoid problems with EM and other functionality.

mdekker

mdekker

2013-08-12 13:17

reporter   ~25972

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

mdekker

mdekker

2013-08-12 13:19

reporter   ~25973

Only fixed for 2.05, we need to discuss moving version compatibility to the model so all imports work the same. In this case I had trouble with allowjumps at survey level and for answers that relevance/assesment_value field should be numeric. This was done in other imports, but not in tsv import.

c_schmitz

c_schmitz

2013-08-16 13:54

administrator   ~26011

2.05 beta 6 released

Related Changesets

LimeSurvey: 2.05 17e03c42

2013-08-12 11:14:00

mdekker

Details Diff
Fixed 07885: Multiple issues with excel/tsv export and subsequent import
dev: Fixed for 2.05 only
dev: it would be best to solve backward compatibility in the model so we don't have to do it for all import/exports separately, check my comment in the survey.php to keep track of changes
Affected Issues
07885
mod - application/helpers/admin/import_helper.php Diff File
mod - application/models/Survey.php Diff File

Issue History

Date Modified Username Field Change
2013-05-28 04:00 rowanc New Issue
2013-05-28 04:00 rowanc File Added: limesurvey_survey_756269.lss
2013-05-28 06:21 rowanc File Added: limesurvey_survey_756269.txt
2013-05-28 09:03 mfaber Issue Monitored: mfaber
2013-06-02 17:54 c_schmitz Note Added: 25448
2013-06-02 17:54 c_schmitz Assigned To => c_schmitz
2013-06-02 17:54 c_schmitz Status new => feedback
2013-06-14 14:59 c_schmitz Note Added: 25531
2013-07-21 15:59 mfaber Note Added: 25819
2013-07-21 19:37 mfaber Relationship added related to 07970
2013-07-21 19:45 mfaber Status feedback => confirmed
2013-08-12 13:17 mdekker Changeset attached => LimeSurvey 2.05 17e03c42
2013-08-12 13:17 mdekker Note Added: 25972
2013-08-12 13:17 mdekker Assigned To c_schmitz => mdekker
2013-08-12 13:17 mdekker Resolution open => fixed
2013-08-12 13:19 mdekker Note Added: 25973
2013-08-12 13:19 mdekker Status confirmed => resolved
2013-08-12 13:19 mdekker Fixed in Version => 2.05 RC
2013-08-16 13:54 c_schmitz Note Added: 26011
2013-08-16 13:54 c_schmitz Status resolved => closed
2021-08-02 17:32 guest Bug heat 6 => 8