View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08039Bug reportsImport/Exportpublic2013-08-21 09:30
Reportermfaber Assigned Tomfaber  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.05 RC 
Target Version2.05 RCFixed in Version2.05 RC 
Summary08039: Subquestion code '0' means trouble
Description

If numbers are used as subquestion code (see attached picture) it works for all except for the number zero. Number 0 is replaced by "" in the variable name (see response array in attached picture).

This for example leads to values being VV-exported under code instead of [code]_0.
Any user input is lost, when vv-imported again. (see response browser in attached picture)

This seems to apply to at least array and multiple choice questions. Maybe all question types with subquestions?

Steps To Reproduce

import attached LSA
VV-export answers
VV-import exported answers (option: renumber)
compare answers

Also:
take survey, have a look at the response array

TagsNo tags attached.
Attached Files
SQequalsZero_question.JPG (82,234 bytes)   
SQequalsZero_question.JPG (82,234 bytes)   
SQequalsZero_response_array.JPG (35,966 bytes)   
SQequalsZero_response_array.JPG (35,966 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)130723
I will donate to the project if issue is resolvedNo
BrowserFF
Database type & versionMySQL (recent XAMP)
Server OS (if known)Win7
Webserver software & version (if known)Apache (recent XAMP)
PHP VersionPHP (recent XAMP)

Relationships

related to 08065 closedmfaber Custom answer code "0" is wrongly exported as "" 

Users monitoring this issue

There are no users monitoring this issue.

Activities

mfaber

mfaber

2013-08-02 23:42

reporter   ~25911

can someone have a look and merge if ok?
https://github.com/LimeSurvey/LimeSurvey/pull/102

Thanks
M

sammousa

sammousa

2013-08-13 14:28

reporter   ~25991

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

mfaber

mfaber

2013-08-13 14:35

reporter   ~25992

Thanks, Sammousa!

c_schmitz

c_schmitz

2013-08-16 13:54

administrator   ~26009

2.05 beta 6 released

Related Changesets

LimeSurvey: 2.05 a55d4abc

2013-07-31 19:25:35

mfaber


Committer: mfaber Details Diff
Fixes issue 08065: Answer code conversion to '0'

DEV: when exporting to CSV/EXCEL etc. and conversion
DEV: of Y or N to '0' was chosen, values were wrongly
DEV: exported as 'missing values' (empty)
DEV:
DEV: nasty php typing problem....probably same problem
DEV: with issue 08039
Affected Issues
08039, 08065
mod - application/helpers/common_helper.php Diff File

LimeSurvey: 2.05 d5801ca1

2013-08-02 21:29:46

mfaber


Committer: mfaber Details Diff
Fixed issue 08039: Problems with subquestion code '0'

DEV: Both described issues were separate incidences of
DEV: the same thing: php empty()/($var) treat the '0'
DEV: as not set or empty.
DEV: isset() on the other hand also returns "" as true.
DEV: I am afraid this problem may be present more often in
DEV: the code. Maybe implement a custom function
DEV: is_set() which also returns FALSE for "" but TRUE for '0'
Affected Issues
08039
mod - application/helpers/viewHelper.php Diff File
mod - application/libraries/PluginManager/LimesurveyApi.php Diff File

LimeSurvey: 2.05 26efccc1

2013-08-13 12:28:41

sammousa

Details Diff
Merge pull request #102 from mfaber/SQ0meanstrouble205

Fixed issue 08039: Problems with subquestion code '0'
Affected Issues
08039
mod - application/helpers/viewHelper.php Diff File
mod - application/libraries/PluginManager/LimesurveyApi.php Diff File

Issue History

Date Modified Username Field Change
2013-07-23 15:20 mfaber New Issue
2013-07-23 15:20 mfaber File Added: SQequalsZero_question.JPG
2013-07-23 15:21 mfaber File Added: SQequalsZero_response_array.JPG
2013-07-23 15:21 mfaber File Added: SQequalsZero_after_import_export.JPG
2013-07-23 15:27 mfaber Description Updated
2013-07-23 15:29 mfaber Target Version => 2.05 RC
2013-07-31 18:44 mfaber Relationship added related to 08065
2013-08-02 23:40 mfaber Assigned To => mfaber
2013-08-02 23:40 mfaber Status new => assigned
2013-08-02 23:42 mfaber Note Added: 25911
2013-08-02 23:42 mfaber Resolution open => fixed
2013-08-02 23:42 mfaber Fixed in Version => 2.05 RC
2013-08-11 19:29 mfaber Changeset attached => LimeSurvey master 720370bf
2013-08-12 00:33 mfaber Changeset removed LimeSurvey master 720370bf =>
2013-08-13 14:28 mfaber Changeset attached => LimeSurvey 2.05 d5801ca1
2013-08-13 14:28 sammousa Changeset attached => LimeSurvey 2.05 26efccc1
2013-08-13 14:28 sammousa Note Added: 25991
2013-08-13 14:35 mfaber Note Added: 25992
2013-08-13 14:46 mfaber Status assigned => resolved
2013-08-16 13:54 c_schmitz Note Added: 26009
2013-08-16 13:54 c_schmitz Status resolved => closed
2013-08-21 09:30 mfaber Changeset attached => LimeSurvey 2.05 a55d4abc