View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06059Bug reportsExpression Managerpublic2012-05-10 12:22
Reporterblukas Assigned Toc_schmitz  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06059: EM puts spaces between variables
Description

EM puts a space between variables if you call them on a different group than the one you entered them. On the same page/group as you enter the variables this won't happen, but if you try to call them on a different page/group it will.
This is especially problematic if you try to link pictures using the variables.

Steps To Reproduce

GROUP 1
Equation Question "example", question text:
{if(produkte_TH=='Y','TH','')}{if(produkte_BS=='Y','BS','')}{if(produkte_BC=='Y','BC','')}{if(produkte_EX=='Y','EX','')}{if(produkte_ZH=='Y','ZH','')}{if(produkte_HH=='Y','HH','')}{if(produkte_KW=='Y','KW','')}{if(produkte_PW=='Y','PW','')}{if(produkte_SO=='Y','SO','')}

Shows up as "THEXSO" if you select produkte_TH, produkte_EX and produkte_SO
So far so good.

In GROUP 2 call {example} again and it shows up as:
"TH EX SO" for each non-selected option EM puts in 1 space. The code should be e.g. "THEXSO" without the spaces and in the same format as in group 1.

Additional Information

will donate 25$ and iPad template which we had developed for 800$

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)120425
I will donate to the project if issue is resolvedYes
BrowserSafari, IE, Firefox
Database type & versionmySQL 5.0.45
Server OS (if known)UNIX socket
Webserver software & version (if known)UNIX socket
PHP Version5.2.x

Users monitoring this issue

There are no users monitoring this issue.

Activities

blukas

blukas

2012-05-01 22:32

reporter   ~18529

see first screenshot on top. The variables show up correctly (without spaces)
see second screenshot, that variables show up with a space in between them.

c_schmitz

c_schmitz

2012-05-01 22:36

administrator   ~18530

Please attach a simple 3 question survey which is reproducing the issue.

TMSWhite

TMSWhite

2012-05-02 04:00

reporter   ~18533

There is an easier solution. Change the equation question text to this:

{implode('',if(produkte_TH=='Y','TH',''),if(produkte_BS=='Y','BS',''),if(produkte_BC=='Y','BC',''),if(produkte_EX=='Y','EX',''),if(produkte_ZH=='Y','ZH',''),if(produkte_HH=='Y','HH',''),if(produkte_KW=='Y','KW',''),if(produkte_PW=='Y','PW',''),if(produkte_SO=='Y','SO',''))}

blukas

blukas

2012-05-02 23:04

reporter   ~18555

ok, that works. Thanks a lot.

Anyway, I attached a sample survey that reproduces the bug:
First group: tick some multi-question-options and select from the dropdowns. On top of group 1 you will see the CORRECT code
Second group repeats the code, this time with spaces.

c_schmitz

c_schmitz

2012-05-03 20:02

administrator   ~18568

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

c_schmitz

c_schmitz

2012-05-03 20:02

administrator   ~18569

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

Related Changesets

LimeSurvey: Yii cf06f04c

2012-05-03 11:01:10

c_schmitz

Details Diff
Fixed issue 06059: EM puts spaces between variables Affected Issues
06059
mod - application/helpers/common_helper.php Diff File

LimeSurvey: master 3369212a

2012-05-03 11:01:25

c_schmitz

Details Diff
Fixed issue 06059: EM puts spaces between variables Affected Issues
06059
mod - common_functions.php Diff File

Issue History

Date Modified Username Field Change
2012-05-01 22:28 blukas New Issue
2012-05-01 22:31 blukas File Added: Screen shot 2012-05-01 at 22.30.21.png
2012-05-01 22:31 blukas File Added: Screen shot 2012-05-01 at 22.30.47.png
2012-05-01 22:32 blukas Note Added: 18529
2012-05-01 22:36 c_schmitz Note Added: 18530
2012-05-01 22:36 c_schmitz Assigned To => c_schmitz
2012-05-01 22:36 c_schmitz Status new => feedback
2012-05-02 04:00 TMSWhite Note Added: 18533
2012-05-02 23:02 blukas File Added: limesurvey_survey_85577.lss
2012-05-02 23:04 blukas Note Added: 18555
2012-05-02 23:04 blukas Status feedback => assigned
2012-05-03 19:59 c_schmitz Status assigned => resolved
2012-05-03 19:59 c_schmitz Fixed in Version => 1.92+
2012-05-03 19:59 c_schmitz Resolution open => fixed
2012-05-03 20:02 c_schmitz Changeset attached => LimeSurvey Yii cf06f04c
2012-05-03 20:02 c_schmitz Note Added: 18568
2012-05-03 20:02 c_schmitz Changeset attached => LimeSurvey master 3369212a
2012-05-03 20:02 c_schmitz Note Added: 18569
2012-05-10 12:22 c_schmitz Status resolved => closed