View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
18949Bug reportsResponse browsingpublic2023-08-14 09:30
ReporterSESSOU Assigned Totibor.pacalat  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version5.6.x 
Summary18949: Responses filters are case sensitive
Description

Responses filters are case sensitive

Using the same approach as bug 11574 seems to work but I'm not sure it does not have other implications :

In file application/models/SurveyDynamic.php replace $criteria = new CDbCriteria(); by $criteria = new LSDbCriteria();

Steps To Reproduce

Steps to reproduce

Go to responses
Add filter "anabel"

Expected result

Show responses containing "Anabel"

Actual result

Returns nothing

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)5.6.30+230711
I will donate to the project if issue is resolvedNo
BrowserFirefox 102.12.0esr
Database type & versionPostgreSQL 13.11
Server OS (if known)Debian 11
Webserver software & version (if known)Apache 2.4.56
PHP Version7.4.33

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2023-07-26 19:01

manager   ~76284

Last edited: 2023-07-27 14:41

v5: https://github.com/LimeSurvey/LimeSurvey/pull/3311

DenisChenu

DenisChenu

2023-07-27 07:42

developer   ~76288

Have to apply to : Token + Theme + etc … : need new issue reported

  • I reopen an issue with MSSQL :)
gabrieljenik

gabrieljenik

2023-07-27 14:55

manager   ~76297

Have to apply to : Token + Theme + etc … : need new issue reported

Token seems OK.

Still, from a code search these models pop up:

  • Assessment.php
  • Box.php
  • FailedEmail.php
  • Notification.php
  • Participant.php
  • ParticipantAttributeName.php
  • ParticipantShare.php
  • Permissiontemplates.php
  • Question.php
  • QuestionGroup.php
  • QuestionTheme.php
  • SavedControl.php
  • SettingsUser.php
  • SurveyDynamic.php
  • SurveyLink.php
  • Surveymenu.php
  • SurveymenuEntries.php
  • SurveysGroups.php
  • SurveysGroupsettings.php
  • SurveyURLParameter.php
  • Template.php
  • TemplateConfiguration.php
  • User.php
  • UserInPermissionrole.php

BTW: On mysql case insensitve works fine due to the collation (ex: utf8_general_ci), right?

DenisChenu

DenisChenu

2023-07-27 15:25

developer   ~76301

Last edited: 2023-07-27 15:26

BTW: On mysql case insensitve works fine due to the collation (ex: utf8_general_ci), right?

It's about escaping https://github.com/yiisoft/yii/issues/4512

For the other: mus check real utility :)

gabrieljenik

gabrieljenik

2023-07-27 15:47

manager   ~76305

BTW: On mysql case insensitve works fine due to the collation (ex: utf8_general_ci), right?
It's about escaping https://github.com/yiisoft/yii/issues/4512

Got lost. What is about escaping?

What I meant was that the LSDBCriteria implements case insensitive for pgsql.
Then I was asking, why mysql is out of that? I am assuming because of the collation being used when creating the DB?

For the other: mus check real utility :)

I would just do a replacement on those files on DEV branch.
Have them all the same.

DenisChenu

DenisChenu

2023-07-27 17:09

developer   ~76309

Got lost. What is about escaping?

Sorry : MSSQL here (not MySQL) else it's about compare function (with escaping ) public function compare($column, $value, $partialMatch = false, $operator = 'AND', $escape = true)
NOT RELATED TO THIS ISSUE. Just same file partial task are alrea

gabrieljenik

gabrieljenik

2023-07-27 19:27

manager   ~76317

What I mean about mysql is,

  • LSDBCriteria adds insensitive comparison for pgsql
  • So, when a search is being done on MySQL is case sensitive or insensitive?
  • I believe is case insensitive, not because of Yii, justbecause the collation used is utf8mb4_unicode_ci

Initially it was a question. But now I have already answered myself :)

DenisChenu

DenisChenu

2023-07-28 07:54

developer   ~76319

I believe is case insensitive, not because of Yii, justbecause the collation used is utf8mb4_unicode_ci

Yes,

Initially it was a question. But now I have already answered myself :)

I din't understand it was a question  … sorry.

gabrieljenik

gabrieljenik

2023-08-03 23:30

manager   ~76423

Last edited: 2023-08-03 23:32

Tested ok on mysql
Do you have a pgsql for testing there as well?

gabrieljenik

gabrieljenik

2023-08-07 22:24

manager   ~76469

Master PR: https://github.com/LimeSurvey/LimeSurvey/pull/3339

gabrieljenik

gabrieljenik

2023-08-08 14:13

manager   ~76489

Master PR test ok on mysql
Do you have a pgsql for testing there as well?

tibor.pacalat

tibor.pacalat

2023-08-09 13:51

administrator   ~76502

I tested both successfully with Postgres database as well.

guest

guest

2023-08-09 13:52

viewer   ~76503

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

guest

guest

2023-08-09 14:20

viewer   ~76512

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

LimeBot

LimeBot

2023-08-14 09:30

administrator   ~76555

Fixed in Release 6.2.2+230814

Related Changesets

LimeSurvey: 5.x 408b856b

2023-08-09 15:52

Gabriel Jenik

Committer: GitHub


Details Diff
Fixed issue 18949: Responses filters are case sensitive (#3311)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18949
mod - application/models/SurveyDynamic.php Diff File

LimeSurvey: master 6ac5d05f

2023-08-09 15:52

Gabriel Jenik

Committer: GitHub


Details Diff
Fixed issue 18949: Responses filters are case sensitive (#3339)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18949
mod - application/models/SurveyDynamic.php Diff File

Issue History

Date Modified Username Field Change
2023-07-11 12:13 SESSOU New Issue
2023-07-13 23:46 gabrieljenik Assigned To => gabrieljenik
2023-07-13 23:46 gabrieljenik Status new => assigned
2023-07-26 19:01 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-07-26 19:01 gabrieljenik Status assigned => ready for code review
2023-07-26 19:01 gabrieljenik Note Added: 76284
2023-07-26 19:01 gabrieljenik Bug heat 0 => 2
2023-07-27 07:42 DenisChenu Note Added: 76288
2023-07-27 07:42 DenisChenu Bug heat 2 => 4
2023-07-27 07:42 DenisChenu Assigned To DenisChenu =>
2023-07-27 07:42 DenisChenu Status ready for code review => ready for testing
2023-07-27 14:41 gabrieljenik Note Edited: 76284
2023-07-27 14:55 gabrieljenik Note Added: 76297
2023-07-27 14:55 gabrieljenik Assigned To => tibor.pacalat
2023-07-27 15:25 DenisChenu Note Added: 76301
2023-07-27 15:26 DenisChenu Note Edited: 76301
2023-07-27 15:47 gabrieljenik Note Added: 76305
2023-07-27 17:09 DenisChenu Note Added: 76309
2023-07-27 19:27 gabrieljenik Note Added: 76317
2023-07-28 07:54 DenisChenu Note Added: 76319
2023-08-03 23:30 gabrieljenik Status ready for testing => ready for merge
2023-08-03 23:30 gabrieljenik Note Added: 76423
2023-08-03 23:32 gabrieljenik Note Edited: 76423
2023-08-03 23:32 gabrieljenik Status ready for merge => in testing
2023-08-07 22:24 gabrieljenik Note Added: 76469
2023-08-08 14:13 gabrieljenik Note Added: 76489
2023-08-09 13:51 tibor.pacalat Note Added: 76502
2023-08-09 13:51 tibor.pacalat Bug heat 4 => 6
2023-08-09 13:52 Changeset attached => LimeSurvey 5.x 408b856b
2023-08-09 13:52 guest Note Added: 76503
2023-08-09 13:52 guest Bug heat 6 => 8
2023-08-09 13:52 tibor.pacalat Status in testing => resolved
2023-08-09 13:52 tibor.pacalat Resolution open => fixed
2023-08-09 14:20 Changeset attached => LimeSurvey master 6ac5d05f
2023-08-09 14:20 guest Note Added: 76512
2023-08-14 09:30 LimeBot Note Added: 76555
2023-08-14 09:30 LimeBot Status resolved => closed
2023-08-14 09:30 LimeBot Bug heat 8 => 10