View Issue Details

IDProjectCategoryView StatusLast Update
08119Bug reports[All Projects] Import/Exportpublic2013-10-11 11:08
Reportermfaber Assigned Tomfaber  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version2.05 RC 
Target Version2.05 RCFixed in Version2.05 RC 
Summary08119: advanced question attributes broken on survey txt-import
Description

When importing a survey from a txt-file, many advanced question attributes are missing or are corrupted and cannot be changed.
Often, they contain the word "array" instead of a number.

Example 1-question survey attached (.lss and exported .txt)

Steps To Reproduce

New survey
import attached .txt file
look at advanced question attributes (e.g. Minimum answers)

  (contains the word "array" and cannot be changed)
TagsNo tags attached.
Complete LimeSurvey version number (& build)130831
I will donate to the project if issue is resolvedNo
BrowserChrome
Database & DB-VersionMySQL 5.0.10
Server OS (if known)Win7
Webserver software & version (if known)Apache/2.4.3 (Win32)
PHP VersionPhP 5.4.7

Relationships

related to 06502 closedmfaber Development  Unable to import exported multi lang survey 

Activities

mfaber

mfaber

2013-09-01 11:10

reporter  

txtimportbug.lss (14,827 bytes)
mfaber

mfaber

2013-09-01 11:10

reporter  

txtimportbug.txt (12,874 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	date_max	date_min	display_columns	display_rows	dropdown_dates	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		186151																																																																																																								
S		owner_id		1																																																																																																								
S		admin		root																																																																																																								
S		active		N																																																																																																								
S		adminemail		your-email@example.net																																																																																																								
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-09-01																																																																																																								
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		your-email@example.net																																																																																																								
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		navigationdelay		0																																																																																																								
S		nokeyboard		N																																																																																																								
S		alloweditaftercompletion		N																																																																																																								
S		questionindex		0																																																																																																								
SL		surveyls_title		importbug		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		testgroup	1			en																																																																																																						
Q	C	arrayquestion	1	A simple array question		en			N		1			80																					1															3						1																																																				
SQ	0	1		Apple		en																																																																																																						
SQ	0	2		Banana		en																																																																																																						
SQ	0	3		Cherry		en																																																																																																						
txtimportbug.txt (12,874 bytes)
mfaber

mfaber

2013-09-01 11:56

reporter   ~26121

No problem in 2.0 but in 2.05

mfaber

mfaber

2013-09-01 15:39

reporter   ~26122

It has to to with the language column in SQL:question_attributes

In 2.0+ and 2.05:
When an a "non localized" advanced attribute is changed in the admin interface, it will be written to the DB with "NULL" in the language column of SQL:question_attributes....

When importing from a TSV-file, the survey language is written with the attribute to the language column (also for attributes that should be "NULL").

In 2.05, there was a rewrite of getQuestionAttributes, which now only uses attributes if it has language=NULL, so now "imported" attributes (with a language) are missing.

mfaber

mfaber

2013-09-20 19:39

reporter   ~26299

issued PR: https://github.com/LimeSurvey/LimeSurvey/pull/127

c_schmitz

c_schmitz

2013-09-25 22:38

administrator   ~26370

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

c_schmitz

c_schmitz

2013-10-11 11:08

administrator   ~26707

2.05RC2 released

Related Changesets

LimeSurvey: 2.05 99076cde

2013-09-20 17:06:06

mfaber


Committer: mfaber Details Diff
Fixed issue 08119: (tsv-import) adv Q-attributes broken

DEV: non i18n-attributes are now set to lang=null
Affected Issues
08119
mod - application/helpers/admin/import_helper.php Diff File

LimeSurvey: 2.05 9b202aa9

2013-09-25 20:38:19

c_schmitz

Details Diff
Merge pull request #127 from mfaber/txtimport_qattrib205

Fixed issue 08119: (tsv-import) adv Q-attributes broken
Affected Issues
08119
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2013-09-01 11:08 mfaber New Issue
2013-09-01 11:10 mfaber File Added: txtimportbug.lss
2013-09-01 11:10 mfaber File Added: txtimportbug.txt
2013-09-01 11:56 mfaber Note Added: 26121
2013-09-01 15:39 mfaber Note Added: 26122
2013-09-01 15:42 mfaber Relationship added related to 06502
2013-09-20 19:36 mfaber Issue cloned: 08181
2013-09-20 19:38 mfaber Assigned To => mfaber
2013-09-20 19:38 mfaber Status new => assigned
2013-09-20 19:39 mfaber Note Added: 26299
2013-09-20 19:39 mfaber Resolution open => fixed
2013-09-20 19:39 mfaber Fixed in Version => 2.05 RC
2013-09-20 19:39 mfaber Target Version => 2.05 RC
2013-09-25 22:38 mfaber Changeset attached => LimeSurvey 2.05 99076cde
2013-09-25 22:38 c_schmitz Changeset attached => LimeSurvey 2.05 9b202aa9
2013-09-25 22:38 c_schmitz Note Added: 26370
2013-09-25 22:43 mfaber Status assigned => resolved
2013-10-11 11:08 c_schmitz Note Added: 26707
2013-10-11 11:08 c_schmitz Status resolved => closed