View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
15892Bug reportsDocumentationpublic2021-07-12 11:53
Reporterfabianlehner Assigned Toollehar  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version4.1.5 
Summary15892: List with comment isn't marked as answered if comment is missing
Description

I'm not sure if this is the expected behavior, therefore I'm putting it into Documentation. When choosing from a List with comment (type O) Question without filling the comment field, the corresponding survey page's indexItem.coreClass still includes the index-item-unanswered class.

If this is how it's supposed to be, please document the intended behaviour in https://manual.limesurvey.org/Question_type_-_List_with_comment.

If not, this bug should be moved to another category.

Relevant files (I couldn't grasp the logic, though, especially in the LimeExpressionManager singleton):

  • application/helpers/questionIndexHelper.php, line 148
  • application/helpers/expressions/em_manager_helper.php, possibly around line 6650?? (sidenote: this file is so huge that it apparently doesn't get indexed by the Github search, which makes debugging quite arduous)
TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)4.1.5+200217
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgres 11.5
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.14

Relationships

related to 16776 closedgabrieljenik Question index marks pages with fully answered questions as unanswered 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2020-02-19 08:06

developer   ~56081

A sample survey (lss file) please ?

And about «marked as answered» you mean by class name ? Class name where (screenshot can be cool).

fabianlehner

fabianlehner

2020-02-19 10:34

reporter   ~56087

Thanks for your response! Here's a minimal example, using the vanilla template. After answering Question 1 without typing a comment, Group 1 is still marked as unanswered.

I'm not sure if I understand your second question correctly. Please let me know if you need anything further.

fabianlehner

fabianlehner

2020-02-20 17:01

reporter   ~56109

Also, I got feedback from a customer today that this behavior actually confuses their customers. IMO, the question should be considered as answered if an option was chosen and the comment field left empty.

DenisChenu

DenisChenu

2020-02-20 17:25

developer   ~56111

Ah OK : with index ...

We have same «issue» with any question in fact ...

For example Multiple non mandatory text : you fill all, index-item-unanswered too ... I don't think we can «fix» it and work in all situation.

fabianlehner

fabianlehner

2020-02-20 18:32

reporter   ~56116

True that. I think it should be consistent with what's considered valid for mandatory questions, though. If a mandatory question is considered as answered (i.e., the survey can be submitted), the visual presentation should indicate exactly that. At the moment it seems there are two different logics for validating mandatory questions and the presentation – or am I mistaken here?

DenisChenu

DenisChenu

2020-02-21 08:21

developer   ~56127

Last edited: 2020-02-21 08:21

About mandatory : my opinion : if the group have error : must be shown as invalid.

At the moment it seems there are two different logics for validating mandatory questions and the presentation – or am I mistaken here?

Didn't know

fabianlehner

fabianlehner

2021-03-06 08:42

reporter   ~62808

@DenisChenu we're still facing this issue.

I think it needs a design decision: Should the anwered/unanswered state reflect the validity state of the survey/page? For me, this would make perfect sense: The user gets feedback whether the page is ready for submission or something's missing. Like it is now, the unanswered state is quite confusing, since it marks a validly filled page as unanwered.

fabianlehner

fabianlehner

2021-03-06 08:48

reporter   ~62809

By page, I mean the representation of a survey group on a page, sorry if that wasn't clear.

fabianlehner

fabianlehner

2021-03-06 08:57

reporter   ~62810

Ad mandatory vs. unanswered logic.
In https://github.com/LimeSurvey/LimeSurvey/blob/274ee87cadb60e92a6ba3e48b3b17fc511b473af/application/helpers/expressions/em_manager_helper.php#L6196 the comment subquestion is explicitly removed from the mandatory validation. In the section below, where the unanswered state is determined, it is handled differently (no separate logic for type O).

I'm happy to contribute a PR if we can agree on harmonizing valid/answered states, please let me know :)

DenisChenu

DenisChenu

2021-03-06 10:41

developer   ~62811

related to the last fix of @gabrieljenik

I think you have a really good idea : show as unanswered must mean : invalid if mandatory (but not mandatory)

fabianlehner

fabianlehner

2021-04-07 10:24

reporter   ~63851

I've created a pull request: https://github.com/LimeSurvey/LimeSurvey/pull/1837

guest

guest

2021-04-07 15:33

viewer   ~63853

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

fabianlehner

fabianlehner

2021-04-08 11:22

reporter   ~63865

Thanks to all who contributed! :)

c_schmitz

c_schmitz

2021-07-12 11:53

administrator   ~65327

Release done.

Related Changesets

LimeSurvey: master 5cb7d0c0

2021-04-07 15:33:38

Fabian Lehner


Committer: GitHub Details Diff
Fixed issue 15892: "List with comment" appears as unanswered in question index if comment is not given Affected Issues
15892
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2020-02-18 15:20 fabianlehner New Issue
2020-02-19 08:06 DenisChenu Note Added: 56081
2020-02-19 10:34 fabianlehner File Added: limesurvey_survey_492215_TypeOtest.lss
2020-02-19 10:34 fabianlehner File Added: Screen Shot 2020-02-19 at 10.31.57.png
2020-02-19 10:34 fabianlehner Note Added: 56087
2020-02-20 17:01 fabianlehner Note Added: 56109
2020-02-20 17:25 DenisChenu Note Added: 56111
2020-02-20 18:32 fabianlehner Note Added: 56116
2020-02-21 08:21 DenisChenu Note Added: 56127
2020-02-21 08:21 DenisChenu Note Edited: 56127
2021-03-06 08:42 fabianlehner Note Added: 62808
2021-03-06 08:48 fabianlehner Note Added: 62809
2021-03-06 08:57 fabianlehner Note Added: 62810
2021-03-06 10:39 DenisChenu Relationship added related to 16776
2021-03-06 10:41 DenisChenu Note Added: 62811
2021-04-07 10:24 fabianlehner Note Added: 63851
2021-04-07 15:33 Changeset attached => LimeSurvey master 5cb7d0c0
2021-04-07 15:33 guest Note Added: 63853
2021-04-07 15:56 ollehar Assigned To => ollehar
2021-04-07 15:56 ollehar Status new => resolved
2021-04-07 15:56 ollehar Resolution open => fixed
2021-04-08 11:22 fabianlehner Note Added: 63865
2021-07-12 11:53 c_schmitz Note Added: 65327
2021-07-12 11:53 c_schmitz Status resolved => closed