View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
09018Bug reportsExpression Managerpublic2015-11-21 17:29
ReporterDereje Assigned Toc_schmitz  
PrioritynormalSeverityfeature 
Status closedResolutionwon't fix 
Product Version2.05+ 
Summary09018: Allow Underscore (_) again in Question Codes (Variable Names) in Version 2.05+ (and future)
Description

Question Codes (Variable Names)

The survey logic file gives the comment:
"Starting in 2.05, variable names should only contain letters and numbers; and may not start with a number. This variable name is deprecated."

Why is this? I would agree of definately rejecting spaces in Question Codes, but unterscore (underline) [_] should be possible,
because of better organizing variable names, like "Q0102_RespondantAge" (giving the question number 01.02 in questionnaire and short description of content)

Could underscore be allowed again??

Steps To Reproduce

Define a Question Code with the following text:

Q0102_Age

(See example question (.lss-file) attached).
Then see the "Survey Logic File" for this question.

TagsNo tags attached.
Attached Files
limesurvey_question_402.lsq (3,266 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Question</LimeSurveyDocType>
 <DBVersion>177</DBVersion>
 <languages>
  <language>am</language>
  <language>en</language>
 </languages>
 <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[402]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[421876]]></sid>
    <gid><![CDATA[26]]></gid>
    <type><![CDATA[N]]></type>
    <title><![CDATA[Q0102_Age]]></title>
    <question><![CDATA[1.02 Age of respondent]]></question>
    <preg/>
    <help><![CDATA[If age is unknown, approximate through past events ]]></help>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <question_order><![CDATA[1]]></question_order>
    <language><![CDATA[am]]></language>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
   <row>
    <qid><![CDATA[402]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[421876]]></sid>
    <gid><![CDATA[26]]></gid>
    <type><![CDATA[N]]></type>
    <title><![CDATA[Q0102_Age]]></title>
    <question><![CDATA[1.02 Age of respondent]]></question>
    <preg/>
    <help><![CDATA[If age is unknown, approximate through past events ]]></help>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></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>
  </rows>
 </questions>
 <question_attributes>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>attribute</fieldname>
   <fieldname>value</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[402]]></qid>
    <attribute><![CDATA[max_num_value_n]]></attribute>
    <value><![CDATA[130]]></value>
   </row>
   <row>
    <qid><![CDATA[402]]></qid>
    <attribute><![CDATA[maximum_chars]]></attribute>
    <value><![CDATA[3]]></value>
   </row>
   <row>
    <qid><![CDATA[402]]></qid>
    <attribute><![CDATA[min_num_value_n]]></attribute>
    <value><![CDATA[10]]></value>
   </row>
   <row>
    <qid><![CDATA[402]]></qid>
    <attribute><![CDATA[num_value_int_only]]></attribute>
    <value><![CDATA[1]]></value>
   </row>
   <row>
    <qid><![CDATA[402]]></qid>
    <attribute><![CDATA[suffix]]></attribute>
    <value><![CDATA[years]]></value>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[402]]></qid>
    <attribute><![CDATA[text_input_width]]></attribute>
    <value><![CDATA[2]]></value>
   </row>
  </rows>
 </question_attributes>
</document>
limesurvey_question_402.lsq (3,266 bytes)   
Bug heat14
Complete LimeSurvey version number (& build)140422
I will donate to the project if issue is resolvedNo
BrowserFirefox 28
Database type & versionMySQL 5.5.32 (Community Server) + mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
Server OS (if known)Windows 7
Webserver software & version (if known)ApacheFriends XAMPP Version 1.8.2
PHP Version5.4.16

Relationships

has duplicate 09505 assignedc_schmitz Feature requests Allow for underscore in question codes (again) 

Users monitoring this issue

ayk

Activities

c_schmitz

c_schmitz

2014-05-03 21:17

administrator   ~29954

Underscores are used for variable namings and database fields as separator.
If they are used as separators in question codes, too, the uniqueness us not given anymore - which created problems in the past.

Issue History

Date Modified Username Field Change
2014-05-02 23:56 Dereje New Issue
2014-05-02 23:56 Dereje File Added: limesurvey_question_402.lsq
2014-05-03 21:17 c_schmitz Note Added: 29954
2014-05-03 21:17 c_schmitz Status new => closed
2014-05-03 21:17 c_schmitz Assigned To => c_schmitz
2014-05-03 21:17 c_schmitz Resolution open => won't fix
2014-11-25 05:31 ayk Issue Monitored: ayk
2015-11-21 17:29 DenisChenu Relationship added has duplicate 09505
2021-08-02 16:29 guest Bug heat 10 => 14