View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|16720||Bug reports||Import/Export||public||2020-10-06 08:35||2021-02-22 13:34|
|Summary||16720: Old/invalid question codes adjusted during LSS import do not get replaced|
I am importing an old 2.06 survey at which we used underscores within the question codes. That is not valid anymore at LS 3.23 so the system removes the underscore so we get a valid code and it also replaces most occurrences of the code within the survey, but not everywhere. I noticed that the adjusted code does not get updated when being used at:
|Steps To Reproduce|
I am adding some screenshots showing the problem.
What surprises me is that often within the same question, some adjusted question codes were replaced properly but others were not.
|Tags||No tags attached.|
|Complete LimeSurvey version number (& build)||Version 3.23.5+200923|
|I will donate to the project if issue is resolved||No|
|Sync to Zoho Project||Yes|
|Database & DB-Version||MySQL|
|Server OS (if known)||Linux|
|Webserver software & version (if known)||Apache|
limesurvey_survey_381537.lss (1,648,520 bytes)
adjusted Q Codes.txt (12,564 bytes)
Attention: Several question codes were updated. Please check these carefully as the update may not be perfect with customized expressions. Question code INTERV_INIT was updated to INTERVINIT. Question code ROUTE_SURVEYED was updated to ROUTESURVEYED. Question code RANDOM_NUMBER was updated to RANDOMNUMBER. Question code HAVE_5_MIN_FOR_SURVE was updated to HAVE5MINFORSURVE. Question code TOD_SELECT was updated to TODSELECT. Question code CASE2_INFO was updated to CASE2INFO. Question code ORIGIN_PLACE_TYPE was updated to ORIGINPLACETYPE. Question code ORIGIN_NAME was updated to ORIGINNAME. Question code ORIGIN_ADDRESS was updated to ORIGINADDRESS. Question code ORIGIN_TRANSPORT was updated to ORIGINTRANSPORT. Question code ORIGIN_WALK_TIME was updated to ORIGINWALKTIME. Question code DESTIN_PLACE_TYPE was updated to DESTINPLACETYPE. Question code DESTIN_NAME was updated to DESTINNAME. Question code DESTIN_AIRPORT was updated to DESTINAIRPORT. Question code DESTIN_ADDRESS was updated to DESTINADDRESS. Question code DESTIN_TRANSPORT was updated to DESTINTRANSPORT. Question code DESTIN_WALK_DIS was updated to DESTINWALKDIS. Question code STOP_ON was updated to STOPON. Question code PREV_TRANSFERS was updated to PREVTRANSFERS. Question code TRIP_FIRST_ROUTE was updated to TRIPFIRSTROUTE. Question code TRIP_SECOND_ROUTE was updated to TRIPSECONDROUTE. Question code TRIP_THIRD_ROUTE was updated to TRIPTHIRDROUTE. Question code TRIP_FOURTH_ROUTE was updated to TRIPFOURTHROUTE. Question code NEXT_TRANSFERS was updated to NEXTTRANSFERS. Question code TRIP_NEXT_ROUTE was updated to TRIPNEXTROUTE. Question code TRIP_AFTER_ROUTE was updated to TRIPAFTERROUTE. Question code TRIP_3RD_ROUTE was updated to TRIP3RDROUTE. Question code TRIP_LAST4TH_RTE was updated to TRIPLAST4THRTE. Question code TIME_ON was updated to TIMEON. Question code TRIP_IN_OPPO_DIR was updated to TRIPINOPPODIR. Question code OPPO_DIR_TRIP_TIME was updated to OPPODIRTRIPTIME. Question code HH_SIZE was updated to HHSIZE. Question code STUDENT_STATUS was updated to STUDENTSTATUS. Question code COUNT_VH_HH was updated to COUNTVHHH. Question code REGISTER_TO_WIN_Y_N was updated to REGISTERTOWINYN. Question code REG2WIN_CONTACT was updated to REG2WINCONTACT. Question code ELVIS_STATUS was updated to ELVISSTATUS. Question code ELVIS_COMMENT was updated to ELVISCOMMENT. Question code ELVIS_USER_LOC1 was updated to ELVISUSERLOC1. Question code ELVIS_USER_LOC2 was updated to ELVISUSERLOC2. Question code ELVIS_USER_LOC3 was updated to ELVISUSERLOC3. Question code ELVIS_USER_LOC4 was updated to ELVISUSERLOC4. Question code ELVIS_USER_LOC5 was updated to ELVISUSERLOC5. Question code ELVIS_USER_LOC6 was updated to ELVISUSERLOC6. Question code ELLVIS_EXTRA1 was updated to ELLVISEXTRA1. Question code INTRV_NOTE was updated to INTRVNOTE. Question code ORIGIN_AIRPORT was updated to ORIGINAIRPORT. Question code ENGLISH_ABILITY was updated to ENGLISHABILITY. Question code HOME_LANG_OTHER was updated to HOMELANGOTHER. Question code HOME_OTHER_LANG was updated to HOMEOTHERLANG. Question code CONTACT_IF_NOENGLISH was updated to CONTACTIFNOENGLISH. Question code SELECT_LANGUAGE was updated to SELECTLANGUAGE. Question code SPANISH_PAPER_CALL was updated to SPANISHPAPERCALL. Question code CHINESE_PAPER_CALL was updated to CHINESEPAPERCALL. Question code RESTART_URL was updated to RESTARTURL. Question code VAL_ORIG_LAT was updated to VALORIGLAT. Question code VAL_ORIG_LON was updated to VALORIGLON. Question code VAL_DEST_LAT was updated to VALDESTLAT. Question code VAL_DEST_LON was updated to VALDESTLON. Question code VAL_ON_LAT was updated to VALONLAT. Question code VAL_ON_LON was updated to VALONLON. Question code VAL_OFF_LAT was updated to VALOFFLAT. Question code VAL_OFF_LON was updated to VALOFFLON. Question code VAL_DIST_OB was updated to VALDISTOB. Question code VAL_DIST_BA was updated to VALDISTBA. Question code VAL_DIST_AD was updated to VALDISTAD. Question code VAL_DIST_OD was updated to VALDISTOD. Question code VAL_DUP_PREVTRANS was updated to VALDUPPREVTRANS. Question code VAL_DUP_NEXTTRANS was updated to VALDUPNEXTTRANS. Question code VAL_COUNT_PREVTRANS was updated to VALCOUNTPREVTRANS. Question code VAL_COUNT_NEXTTRANS was updated to VALCOUNTNEXTTRANS. Question code VAL_ACCESS_WALK was updated to VALACCESSWALK. Question code VAL_EGRESS_WALK was updated to VALEGRESSWALK. Question code VAL_CONST_MAX_WALK was updated to VALCONSTMAXWALK. Question code VAL_CONST_MIN_VEH was updated to VALCONSTMINVEH. Question code FLG_ACC_WALK_FAR was updated to FLGACCWALKFAR. Question code FLG_EGR_WALK_FAR was updated to FLGEGRWALKFAR. Question code FLG_ACC_VEH_UNNC was updated to FLGACCVEHUNNC. Question code FLG_EGR_VEH_UNNC was updated to FLGEGRVEHUNNC. Question code FLG_TRAN_OB_UNNC was updated to FLGTRANOBUNNC. Question code FLG_TRAN_AD_UNNC was updated to FLGTRANADUNNC. Question code FLG_DIST_OD_ZERO was updated to FLGDISTODZERO. Question code FLG_DIST_OD_TOO_LESS was updated to FLGDISTODTOOLESS. Question code FLG_DIST_OD_TOO_FAR was updated to FLGDISTODTOOFAR. Question code FLG_DIST_BA_ZERO was updated to FLGDISTBAZERO. Question code FLG_DIST_BA_TOO_LESS was updated to FLGDISTBATOOLESS. Question code FLG_TIME_TRANS_TOO_L was updated to FLGTIMETRANSTOOL. Question code FLG_TRANS_UNNC was updated to FLGTRANSUNNC. Question code FLG_DIST_OB_TOO_LONG was updated to FLGDISTOBTOOLONG. Question code FLG_DIST_AD_TOO_LONG was updated to FLGDISTADTOOLONG. Question code FLG_DUP_PREV_TRAN was updated to FLGDUPPREVTRAN. Question code FLG_DUP_NEXT_TRAN was updated to FLGDUPNEXTTRAN. Question code FLG_DIST_CHECK_OK was updated to FLGDISTCHECKOK. Question code NEXT_TRAN_4_ON_BUS was updated to NEXTTRAN4ONBUS. Question code NEXT_TRAN_3_ON_BUS was updated to NEXTTRAN3ONBUS. Question code NEXT_TRAN_2_ON_BUS was updated to NEXTTRAN2ONBUS. Question code HOME_ADDRESS was updated to HOMEADDRESS. Question code _TCL_FARE was updated to TCLFARE. Question code PREV_TRAN_1_OFF_BUS was updated to PREVTRAN1OFFBUS. Question code NEXT_TRAN_1_ON_BUS was updated to NEXTTRAN1ONBUS. Question code PREV_TRAN_2_ON_BUS was updated to PREVTRAN2ONBUS. Question code PREV_TRAN_3_ON_BUS was updated to PREVTRAN3ONBUS. Question code PREV_TRAN_4_ON_BUS was updated to PREVTRAN4ONBUS. Question code PREV_TRAN_1_ON_BUS was updated to PREVTRAN1ONBUS. Question code NEXT_TRAN_1_OFF_BUS was updated to NEXTTRAN1OFFBUS. Question code NEXT_TRAN_2_OFF_BUS was updated to NEXTTRAN2OFFBUS. Question code NEXT_TRAN_3_OFF_BUS was updated to NEXTTRAN3OFFBUS. Question code NEXT_TRAN_4_OFF_BUS was updated to NEXTTRAN4OFFBUS. Question code PREV_TRAN_2_OFF_BUS was updated to PREVTRAN2OFFBUS. Question code PREV_TRAN_3_OFF_BUS was updated to PREVTRAN3OFFBUS. Question code PREV_TRAN_4_OFF_BUS was updated to PREVTRAN4OFFBUS. Question code HV5MIN_TIME was updated to HV5MINTIME. Question code HOMEADD_TIME was updated to HOMEADDTIME. Question code ORGNTR_TIME was updated to ORGNTRTIME. Question code STOPON_TIME was updated to STOPONTIME. Question code DESPLACE_TIME was updated to DESPLACETIME. Question code PREVTRANS_TIME was updated to PREVTRANSTIME. Question code REVIEWSCR_TIME was updated to REVIEWSCRTIME. Question code LANGOTHER_TIME was updated to LANGOTHERTIME. Question code FLG_STOPSEQ was updated to FLGSTOPSEQ. Question code ORIGIN_TRANS_TIME was updated to ORIGINTRANSTIME. Question code DESTIN_WALK_TIME was updated to DESTINWALKTIME. Question code ORIG_AIR_TIME was updated to ORIGAIRTIME. Question code ORIG_ADD_TIME was updated to ORIGADDTIME. Question code INCOME_TIME was updated to INCOMETIME. Question code NOTE_TIME was updated to NOTETIME. Question code REGISTER_TO_WIN_TIME was updated to REGISTERTOWINTIME. Question code VAL_DIST_OtoPre0 was updated to VALDISTOtoPre0. Question code VAL_DIST_NOFF_TO_D was updated to VALDISTNOFFTOD. Question code VAL_LAST_NEXT_LON was updated to VALLASTNEXTLON. Question code VAL_LAST_NEXT_LAT was updated to VALLASTNEXTLAT. Question code _FROM_TRNSFR_PT_SUMM was updated to FROMTRNSFRPTSUMM. Question code _TO_TRNSFER_PT_SUMM was updated to TOTRNSFERPTSUMM. Question code SURVEY_LANGUAGE was updated to SURVEYLANGUAGE. Question code ORIGIN_SCHOOLK12 was updated to ORIGINSCHOOLK12. Question code ORIGIN_COLLEGE was updated to ORIGINCOLLEGE. Question code DESTIN_SCHOOLK12 was updated to DESTINSCHOOLK12. Question code DESTIN_COLLEGE was updated to DESTINCOLLEGE. Question code ORIGIN_BOARD_VEH was updated to ORIGINBOARDVEH. Question code DESTIN_DROPOFF was updated to DESTINDROPOFF. Question code ELVIS_HISTORY was updated to ELVISHISTORY. Question code ELVIS_USER_CHANGE_1 was updated to ELVISUSERCHANGE1. Question code ELVIS_USER_CHANGE_2 was updated to ELVISUSERCHANGE2. Question code ELVIS_USER_CHANGE_3 was updated to ELVISUSERCHANGE3. Question code ELVIS_USER_CHANGE_4 was updated to ELVISUSERCHANGE4. Question code ELVIS_USER_CHANGE_5 was updated to ELVISUSERCHANGE5. Question code ELVIS_USER_CHANGE_6 was updated to ELVISUSERCHANGE6. Question code ELVIS_USER_CHANGE_7 was updated to ELVISUSERCHANGE7. Question code TIME_ADJUST was updated to TIMEADJUST. Question code WHERE_PURCHASED was updated to WHEREPURCHASED. Question code EMPLOYED_IN_HH was updated to EMPLOYEDINHH. Question code VIET_PAPER_CALL was updated to VIETPAPERCALL. Question code _KOREAN_PAPER_CALL was updated to KOREANPAPERCALL. Question code REFUS_AGE_OBSERVED was updated to REFUSAGEOBSERVED. Question code REFUS_GENDER_OBSRVED was updated to REFUSGENDEROBSRVED. Question code REFUS_RACETHN_OBSERV was updated to REFUSRACETHNOBSERV. Question code STOP_OFF was updated to STOPOFF. Question code STOPOFF_TIME was updated to STOPOFFTIME. Question code _STUDENT_PASS was updated to STUDENTPASS. Question code GENDER_INFO was updated to GENDERINFO. Question code EMPLOYMENT_STATUS was updated to EMPLOYMENTSTATUS. Question code RESIDENT_OR_VISITOR was updated to RESIDENTORVISITOR. Question code HOTEL_ADDRESS was updated to HOTELADDRESS. Question code VIS_ZIP was updated to VISZIP. Question code USED_VEH_TRIP was updated to USEDVEHTRIP. Question code _INCOME_REFUSED was updated to INCOMEREFUSED. Question code _RATE_SATISFACTION was updated to RATESATISFACTION. Question code _DONE_BEFORE was updated to DONEBEFORE. Question code _ORIGIN_BIKE_LOCKUP was updated to ORIGINBIKELOCKUP. Question code _DEST_BIKE_LOCKUP was updated to DESTBIKELOCKUP. Question code _RETURN_TRIP_MODE was updated to RETURNTRIPMODE. Question code HAVE_DL was updated to HAVEDL. Question code SCHOOL_NAME was updated to SCHOOLNAME. Question code RIDE FREQUENCY was updated to RIDEFREQUENCY. Question code TYPE OF PASS was updated to TYPEOFPASS. Question code PAYMENT METHOD was updated to PAYMENTMETHOD. Question code HH_TOTAL_DL was updated to HHTOTALDL. Question code HAVE_DISABILITY was updated to HAVEDISABILITY. Question code FUTURE_SURVEYS was updated to FUTURESURVEYS. Question code FUT_SURVEY_CONTACT was updated to FUTSURVEYCONTACT. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion C_DATE was updated to CDATE. Title of subquestion C_FIELD was updated to CFIELD. Title of subquestion C_REASON was updated to CREASON. Title of subquestion GPS_TIME was updated to GPSTIME. Title of subquestion GPS_TIME was updated to GPSTIME. Title of subquestion GPS_TIME was updated to GPSTIME. Title of subquestion GPS_TIME was updated to GPSTIME. Title of subquestion GPS_TIME was updated to GPSTIME. Title of subquestion GPS_TIME was updated to GPSTIME.
adjusted Q Codes.txt (12,564 bytes)
It's weird that the same code sometimes gets replaced and sometimes does not get replaced within the same question, see additional screenshot.
I am also attaching the manually adjusted LSS file with the wrong codes being corrected. Maybe that helps comparing where things go wrong.
limesurvey_survey_381537_LS3_nach_anpassung_4.lss (1,138,171 bytes)
I think it's because we import by order of XML, adn fix with same order.
Potential fix :
Good catch, Denis. That could explain the weird behavior. We should definitely make sure that replacements are done in one go and cover all occurrences. Maybe do the code adjustments first and then do the replacements based on an array with old and new codes. That way we make sure the whole file is processed from beginning to end and all placeholders get adjusted properly.
It's just an idea :)
@cdorin, this is a really annoying bug if you need to copy surveys from a 2.x system to 3.x. Can someone please work on a fix? Denis already suggested a potential solution.
@cdorin, we really need a fix for a long term Limesurvey customer who frequently needs to import surveys from 2.0x to 3.x and faces the mentioned issues.
We need this for our most important customer which is switching from 2.x to 3.x and faces that issue with multiple surveys. They can't use LS 3.x unless this is fixed because they need to copy-over many surveys.
When does it happen? When you import a survey from 2.x to 3.x? Are there issues when upgrading the db? (upgrading LS2 to LS3)
@cdorin, thanks for getting back to me. The problem shows up when importing a Limesurvey 2.x survey to a LS 3.x system.
We did not upgrade the DB but started with an empty DB at the 3.x system.
it is not a bug from what I see, but a feature request from what I see. The import system won't be improved by us too soon.
@cdorin, this surely is a bug. Since LS 3.x (or even earlier), older question codes like QUESTION_CODE get replaced and turned into valid codes like QUESTIONCODE. This replacement is done during import. But as you can see at the screenshots, the replacements sometimes fail. So this is a bug.
My opinion : Even if it's an issue old than 2.05 : it sill an issue :), not a feature.
|2020-10-06 08:35||Mazi||New Issue|
|2020-10-06 08:35||Mazi||File Added: limesurvey_survey_381537.lss|
|2020-10-06 08:35||Mazi||File Added: adjusted Q Codes.txt|
|2020-10-06 08:35||Mazi||File Added: qcode_adjustments.png|
|2020-10-06 08:35||Mazi||File Added: end_message.png|
|2020-10-06 08:35||Mazi||File Added: text_display.png|
|2020-10-06 08:46||Mazi||Note Added: 60077|
|2020-10-06 08:46||Mazi||File Added: qcode_replacement.png|
|2020-10-06 09:04||Mazi||Severity||minor => block|
|2020-10-06 09:04||Mazi||Description Updated||View Revisions|
|2020-10-06 09:04||Mazi||Steps to Reproduce Updated||View Revisions|
|2020-10-06 09:04||Mazi||Additional Information Updated||View Revisions|
|2020-10-07 09:46||Mazi||Note Added: 60099|
|2020-10-07 09:46||Mazi||File Added: limesurvey_survey_381537_LS3_nach_anpassung_4.lss|
|2020-10-09 22:50||DenisChenu||Note Added: 60139|
|2020-10-12 16:28||Mazi||Note Added: 60157|
|2020-10-12 16:35||DenisChenu||Note Added: 60158|
|2020-12-07 10:30||Mazi||Note Added: 60851|
|2021-01-11 15:01||Mazi||Note Added: 61478|
|2021-01-25 15:13||Mazi||Note Added: 61662|
|2021-01-25 18:18||gabrieljenik||View Status||private => public|
|2021-01-25 18:18||cdorin||Note Added: 61664|
|2021-01-25 18:23||Mazi||Note Added: 61665|
|2021-01-26 10:06||cdorin||Priority||none => normal|
|2021-01-26 10:06||cdorin||Status||new => confirmed|
|2021-01-26 12:16||cdorin||Note Added: 61678|
|2021-01-26 12:16||cdorin||Status||confirmed => acknowledged|
|2021-01-26 12:28||Mazi||Note Added: 61679|
|2021-01-26 12:32||DenisChenu||Note Added: 61680|
|2021-01-29 18:08||gabrieljenik||Issue cloned: 17038|
|2021-02-03 18:58||Mazi||Note Added: 61905|
|2021-02-22 13:34||c_schmitz||Sync to Zoho Project||=> Yes|
|2021-02-22 13:34||c_schmitz||Assigned To||=> aesteban|
|2021-02-22 13:34||c_schmitz||Status||acknowledged => assigned|