View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14028Bug reportsExpression Managerpublic2018-09-06 09:49
Reportercdorin Assigned To 
PrioritynoneSeveritypartial_block 
Status closedResolutionno change required 
Product Version3.13.x 
Summary14028: "If" and "qcode_other" not working properly
Description

if statement not working properly if qcode_other is used in the condition.

For example, I got two questions Q00 and Q01 in my example and I want to pipe the "other" answer, if selected, to Q1. The code would look like this: if(Q00_other == 'Y', Q00_other.shown, Q00.shown). However, Q01 does not display Q00_other.shown... only "-oth-".

However, if I use if(Q00 == 'Y', Q00.shown, Q00_other.shown), everything seems to be working fine.

P.s. the comment function seems to be working fine.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)irrelevant
I will donate to the project if issue is resolvedNo
Browser
Database type & versionirrelevant
Server OS (if known)irrelevant
Webserver software & version (if known)irrelevant
PHP Versionirrelevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2018-09-05 11:19

developer   ~48972

No … Q00_other mean : Q00_other.code, then it's value entered by user … (same than shown for text value)
Best use : is_empty(Q00_other.NAOK) …

cdorin

cdorin

2018-09-06 09:48

reporter   ~48979

Ok, so this is actually working with:

{if(Q00.shown=='-oth-', Q00_other.shown, Q00.shown)}

Also, thanks @DenisChenu for your remark!

I will close the bug

cdorin

cdorin

2018-09-06 09:49

reporter   ~48980

It is working - did a mistake

Q00.shown=='oth' has to be used

Issue History

Date Modified Username Field Change
2018-09-04 14:55 cdorin New Issue
2018-09-04 14:55 cdorin File Added: limesurvey_survey_861963 (1).lss
2018-09-04 17:11 cdorin Severity minor => partial_block
2018-09-05 11:19 DenisChenu Note Added: 48972
2018-09-06 09:48 cdorin Note Added: 48979
2018-09-06 09:49 cdorin Status new => closed
2018-09-06 09:49 cdorin Resolution open => no change required
2018-09-06 09:49 cdorin Note Added: 48980