View Issue Details

This issue affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
08595Bug reportsOtherpublic2014-02-04 15:09
Reporterintentcook Assigned ToDenisChenu  
PrioritylowSeverityminor 
Status closedResolutionsuspended 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08595: Space added in LS
Description

Sam has asked me to raise this bug.

This is the bug report that I have put on Sams development site for us

A NOTE has been added to this issue.

http://bugs.befound.nl/view.php?id=188
======================================================================
Reported By: johncook
Assigned To: sam
======================================================================
Project: 5deep
Issue ID: 188
Category: Bugs
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Target date:
======================================================================
Date Submitted: 2014-01-11 04:31 CET
Last Modified: 2014-01-23 08:19 CET
======================================================================
Summary: if code staements
Description:
I am using the following codes

jc1_t This one work OK as we tested

{if(jc1 == 1, "A Fit","")}{if(jc1 == 4, "A Challenge","")}{if(jc1 == 5, "A Stretch","")}

jc2_t

{if(jc2 == 1, "Compatible", "")}{if(jc2 == 5, "Not Compatible","")}

jc3_t does not work

{if(jc3 == 1, "Compatible","")}{if(jc3 == 5, "Not Compatible","")}

jc4_t does not work

{if(jc4 == 1, "A Future","")}{if(jc4 == 5, "Not A Future","")}

Nothing is showing as wrong!!

QA shows no errors
======================================================================


(0000334) johncook (manager) - 2014-01-17 05:54
http://bugs.befound.nl/view.php?id=188#c334

I have tested several times and it is not working on jc1_t see attached spreadsheet. Go to the jc1_t column that get and answer but the others do not.

Have tried variation but no go.

Could up date the git for me in case but does work on the other release either.


(0000336) johncook (manager) - 2014-01-18 21:06
http://bugs.befound.nl/view.php?id=188#c336

In CultureView CS3 V1R6 SAM - updated the codes to the new format - in testing the jc1t jc2t jc3t and jc4t all work. Tested by unhiding jc1 to jc4 and jct1 to jc4t - displayed report as one page put in the various answers and all shows as correct.

However when you go live the results except jc1t are blank in the spreadsheet output.

The reports for the CultureView CS3 full I will update the codes.

Sam I would appreciate if you use the SAM version for testing - Thanks.

Just done some more testings

As one page activated - completed the whole questionnaire at the end the results showed ok but when submit system crashes and will not save result

As question by question - completed the whole questionnaire at the end the jc1 to jc4 results showed OK but jct1 to jct4 were blank again and error submit says it had not done it but it is completed - the excel or csv spreadsheet jc1t shows correct even though blank at end of report the rest are blank.

Hope this helps.

I also notice that there are 224 columns in the spreadsheet and before when you selected excel then you were warned of a limit - is this a change in LS? However all the fields export. This might be a clue?


(0000368) johncook (manager) - 2014-01-23 05:44
http://bugs.befound.nl/view.php?id=188#c368

Still cannot solve this one the algorithms are OK - if you use CS3 SAM version I have set as one page - the score and the results show as OK - see screenshot.

But this doe not show in exported excel only the jc1t works - just this last three jc2t jc3t and jc4t.

Any ideas where to look?


(0000369) sam (administrator) - 2014-01-23 08:19
http://bugs.befound.nl/view.php?id=188#c369

This is a limesurvey bug. For some reason a space is added to the answer code.
Please report this at the limesurvey bugtracker.

Additional Information

(0000369) sam (administrator) - 2014-01-23 08:19
http://bugs.befound.nl/view.php?id=188#c369

This is a limesurvey bug. For some reason a space is added to the answer code.
Please report this at the limesurvey bugtracker.

attached survey

TagsNo tags attached.
Attached Files
test CS3 jct1.PNG (10,566 bytes)   
test CS3 jct1.PNG (10,566 bytes)   
Bug heat10
Complete LimeSurvey version number (& build)Version 2.05+ Build 140116
I will donate to the project if issue is resolvedNo
BrowserFireFox and Chrome
Database type & versionmysql 5.1.70-cll
Server OS (if known)Apache version 2.2.25
Webserver software & version (if known)Apache version 2.2.25
PHP Version5.4.19

Users monitoring this issue

mfaber

Activities

c_schmitz

c_schmitz

2014-01-26 15:57

administrator   ~28204

I am sorry but this survey is too big to test the issue.
Please attach a survey with a minimum test case (max. 2-3 questions) that reproduces the error.

intentcook

intentcook

2014-01-26 19:38

reporter   ~28224

Attached just the first 4 questions it still does it in export Excel - talk to Sam Mousa he asked me to raise it.

I have left the rest of the algorithms in.

c_schmitz

c_schmitz

2014-02-02 15:27

administrator   ~28395

I am sorry but I don't see what's wrong here. The bug report is very confusing. Please state the issue and how to reproduce it using the attached survey. Thank you.

intentcook

intentcook

2014-02-02 18:18

reporter   ~28398

Have you contacted Sam Mousa as suggested. sammousa@gmail.com

  1. the algorithms for jc1t to jc4t work fine when on screen and are un-hidden the results show.
  2. When you export as an excel or csv file only jct1 returns a result - jc2t to jc4t are blank returning nothing.

Hope this clear - the problem is in export.

c_schmitz

c_schmitz

2014-02-02 19:55

administrator   ~28401

If I import the attached survey here it is full of EM errors, mostly referring question codes are wrong. The survey is still way too long and pretty much unusable for bug testing.

Anyway, it looks like you need to set the output of the equation to numeric (advanced question attributes) otherwise the result is a string and you are comparing to =1 not ='1' so it fails.

Anyway, I don't think it is a bug.

intentcook

intentcook

2014-02-02 22:27

reporter   ~28406

Disagree

here are the screen shots - does not make sense because why does jc1t work and jv2t jc3t and jc4t do not work.

I know the other return codes because I did not take them the them out for this test sample.

Attached is screen shot of all in one you can see the answers are correct. Also attached is excel spreadsheet look at col CQ CR CS and CT - CQ returns the correct answer the others are blank.

Hope this helps the problems appears to be a bug in sending to excel or csv file - Sam reckons there is an added space?

intentcook

intentcook

2014-02-02 22:28

reporter   ~28407

have you talked to Sam? see attached screen shots this appears to be an excel cvs problem within LS?

sammousa

sammousa

2014-02-02 22:33

reporter   ~28408

I will try to clear some things up.

A strong indicator that it is in fact a bug is the fact that different behavior is observed with client side evaluation (survey all in one, javascript generated by EM) and server side evaluation (survey question by question).

In the second case, server side, a space is added in front of the answer code.

Further, the problem is not in export but simply in evaluation of the value of a variable. The strange thing is that this does not happen for all questions of that question type. I have also confirmed that the question codes are stored correctly (also in the database).

I do not directly know what is causing this issue, except that it is something EM is doing wrong.

c_schmitz

c_schmitz

2014-02-03 09:57

administrator   ~28429

I cannot reproduce this here as I still have no testing case to reproduce. The attached survey is way too big and full of errors. This already has taken too much of my time trying to find out what the issue is in the first place. I am unassigning this for now. Maybe someone else likes to take this one.

DenisChenu

DenisChenu

2014-02-03 17:40

developer   ~28463

Last edited: 2014-02-03 17:42

There are space before expression in lss file for jc3 and jc4, not for jc1.

Use trim()
or try with Équation settings to numeric only .

Not a bug here, EM result can be 'only space' if needed.

PS: space is visible in editor in txt(upload screen)

intentcook

intentcook

2014-02-04 00:23

reporter   ~28467

Denis

Thank you

I have applied the fix which is really a work around because it begs the question why this does not happen in jc1. It only seems to happen with certain algorithms?

Anyway this is what I have used for jc2 etc

{if(Q01_sq1 =="1",trim(1),"")}{if(Q01_sq1 =="5",trim(5),"")}

At least I have a fix

Thanks again

DenisChenu

DenisChenu

2014-02-04 08:45

developer   ~28469

It's not in algorithm, it's in question text.

To use equation, best is to allways deactivate HTML editor (maybe a plugin idea ? ;) ).
Here, i think it's best if you use :
{if(trim(jc4) == "1", "A Future","")}{if(trim(jc4) == "5", "Not A Future","")}
Denis

DenisChenu

DenisChenu

2014-02-04 08:46

developer   ~28470

Space in equation question text don't need to be removed.

DenisChenu

DenisChenu

2014-02-04 10:16

developer   ~28474

Add some more information

DenisChenu

DenisChenu

2014-02-04 10:28

developer   ~28476

Last edited: 2014-02-04 10:31

With more testing : withlast version : seems to happen only with non-breaking space.

Still an issue with 'only numeric" and & nbsp ;5 : i think we have to remove & nbsp ;   if Advanced settings is set ? (or not ?)

I think of 2 way to fix it (and only for advanced setting/numeric)
floatval(question.text) or
(is_numeric(trim(question.text))? trim(question.text) : "";

Carsten : your advice ?
(see LSA file EQ1 in DB are  5: it's NOT numeric)

intentcook

intentcook

2014-02-04 11:10

reporter   ~28477

Just a point the reason I put in the question algorithm is that long before the text jc4t was even added jc4 was always adding a hatted A before the number in the csv file.

I raised this with Sam last year and he thought it was because I was opening up the csv file in excel - this has proved not to be the case.

So in short jc1 was always OK but jc2, 3 and 4 has always returned the hatted A before the number in a csv file.

The current fix I am using returns the text to the SVG file when called from LS in our app. So the hatted A in the question algorithm appears to have been the cause.

Hope this adds something.

c_schmitz

c_schmitz

2014-02-04 15:05

administrator   ~28518

Denis, feel free to add it.

DenisChenu

DenisChenu

2014-02-04 15:09

developer   ~28519

No change required.

Put another bug for equation/advanced setting/numeric

Issue History

Date Modified Username Field Change
2014-01-25 03:55 intentcook New Issue
2014-01-25 03:55 intentcook File Added: CS3_21Jan14_eng_span_V1R6_limesurvey_survey_761973.lss
2014-01-26 15:57 c_schmitz Note Added: 28204
2014-01-26 15:57 c_schmitz Assigned To => c_schmitz
2014-01-26 15:57 c_schmitz Status new => feedback
2014-01-26 15:57 c_schmitz Priority urgent => normal
2014-01-26 19:38 intentcook Note Added: 28224
2014-01-26 19:38 intentcook Status feedback => assigned
2014-01-26 19:39 intentcook File Added: Test CS3 V1R6 limesurvey_survey_654436.lss
2014-01-27 05:36 mfaber Issue Monitored: mfaber
2014-02-01 17:43 c_schmitz File Deleted: CS3_21Jan14_eng_span_V1R6_limesurvey_survey_761973.lss
2014-02-02 15:27 c_schmitz Note Added: 28395
2014-02-02 15:27 c_schmitz Status assigned => feedback
2014-02-02 18:18 intentcook Note Added: 28398
2014-02-02 18:18 intentcook Status feedback => assigned
2014-02-02 19:55 c_schmitz Note Added: 28401
2014-02-02 19:55 c_schmitz Status assigned => resolved
2014-02-02 19:55 c_schmitz Resolution open => unable to reproduce
2014-02-02 22:27 intentcook Note Added: 28406
2014-02-02 22:28 intentcook Note Added: 28407
2014-02-02 22:28 intentcook Status resolved => feedback
2014-02-02 22:28 intentcook Resolution unable to reproduce => reopened
2014-02-02 22:29 intentcook File Added: test cs3 results-survey654436.xls
2014-02-02 22:30 intentcook File Added: test CS3 jct1.PNG
2014-02-02 22:33 sammousa Note Added: 28408
2014-02-02 22:59 intentcook File Added: Test 3 reduced limesurvey_survey_654436.lss
2014-02-03 09:57 c_schmitz Note Added: 28429
2014-02-03 09:57 c_schmitz Assigned To c_schmitz =>
2014-02-03 09:57 c_schmitz Status feedback => new
2014-02-03 17:40 DenisChenu Note Added: 28463
2014-02-03 17:42 DenisChenu Note Edited: 28463
2014-02-03 17:43 DenisChenu File Added: Capture du 2014-02-03 17:41:35.png
2014-02-04 00:23 intentcook Note Added: 28467
2014-02-04 08:45 DenisChenu Note Added: 28469
2014-02-04 08:46 DenisChenu Note Added: 28470
2014-02-04 08:46 DenisChenu Status new => closed
2014-02-04 08:46 DenisChenu Assigned To => DenisChenu
2014-02-04 08:46 DenisChenu Resolution reopened => no change required
2014-02-04 08:46 DenisChenu Fixed in Version => 2.05+
2014-02-04 10:16 DenisChenu Note Added: 28474
2014-02-04 10:16 DenisChenu Status closed => feedback
2014-02-04 10:16 DenisChenu Resolution no change required => reopened
2014-02-04 10:28 DenisChenu Note Added: 28476
2014-02-04 10:29 DenisChenu File Added: survey_archive_equationNumeric.lsa
2014-02-04 10:29 DenisChenu Priority normal => low
2014-02-04 10:29 DenisChenu Reproducibility have not tried => sometimes
2014-02-04 10:29 DenisChenu Resolution reopened => suspended
2014-02-04 10:30 DenisChenu Note Edited: 28476
2014-02-04 10:31 DenisChenu Note Edited: 28476
2014-02-04 11:10 intentcook Note Added: 28477
2014-02-04 11:10 intentcook Status feedback => assigned
2014-02-04 15:05 c_schmitz Note Added: 28518
2014-02-04 15:09 DenisChenu Note Added: 28519
2014-02-04 15:09 DenisChenu Status assigned => closed
2021-09-10 20:28 guest Bug heat 8 => 10