Page MenuHomeIn-Portal Phabricator
  • Changed Files
  • branches/5.2.x/core/kernel/db/dblist.php

INP-1826 - Convert search/custom having filters into a where filters in grids
ClosedPublic

Authored by alex on Sep 14 2022, 4:34 AM.

Details

Test Plan
  1. login to the Admin Console
  2. go to User ManagementUsers section
  3. type mem in the Primary Group column filter and press the Search button
  4. open Debugger
  5. confirm, that:
    • filter by g.Name column was added into the WHERE clause
    • there was not HAVING clause added
  6. press Reset button
  7. type mem in the genral search box above the grid on the right side and press the Search button
  8. open Debugger
  9. confirm, that:
    • filter by g.Name column was added into the WHERE clause
    • there was not HAVING clause added
  10. press Reset button

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Sep 14 2022, 4:34 AM
alex requested review of this revision.Sep 14 2022, 4:34 AM
erik requested changes to this revision.Sep 14 2022, 5:26 AM

There is not simple filter by g.Name, but complex filter "((1) AND ( (g.Name) LIKE '%mem%'))", where part "(1) AND" is excessive. Maybe, this "(1) AND" should be removed from SQL request.

This revision now requires changes to proceed.Sep 14 2022, 5:26 AM
alex requested review of this revision.EditedSep 14 2022, 11:38 AM
In D431#8692, @erik wrote:

There is not simple filter by g.Name, but complex filter "((1) AND ( (g.Name) LIKE '%mem%'))", where part "(1) AND" is excessive. Maybe, this "(1) AND" should be removed from SQL request.

I'm aware of that extra (1) AND SQL fragment. This is a result of enabling the Perform Exact Search system setting (enabled by default) from the ConfigurationWebsiteAdvanced section. It has an effect on all like filters on all grids.

Since removing that fragment won't give any performance benefits I'm suggesting keeping it for now.

If that was the only concern in this differential revision, then please mark it as Accepted.

erik accepted this revision.Sep 15 2022, 5:18 AM
This revision is now accepted and ready to land.Sep 15 2022, 5:18 AM
This revision was landed with ongoing or failed builds.Nov 14 2023, 2:33 AM
This revision was automatically updated to reflect the committed changes.