Page MenuHomeIn-Portal Phabricator

INP-1487 Create empty search result table, when search keyword is too short
ClosedPublic

Authored by erik on Oct 13 2015, 4:47 AM.

Details

Summary

After dropping search result table it is recreated with no records in it.

Test Plan
  1. select advanced theme
  2. go to front end
  3. make search with empty keyword or short keyword
  4. confirm getting "The keyword is too short!" warning
  5. make search with keyword, matching category name or category item name
  6. confirm getting relevant search results
  7. make search with empty keyword or short keyword
  8. confirm getting "The keyword is too short!" warning
  9. make search with long keyword, matching no category and no category item
  10. confirm getting "Nothing Found!" warning

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

erik updated this revision to Diff 374.Oct 13 2015, 4:47 AM
erik retitled this revision from to INP-1487 Create empty search result table, when search keyword is too short.
erik updated this object.
erik edited the test plan for this revision. (Show Details)
erik added a reviewer: alex.
erik added 1 JIRA issue(s): INP-1487.
alex requested changes to this revision.Nov 5 2015, 2:48 AM
alex edited edge metadata.

Also test plan doesn't cover code path, that caused search table removal in past (e.g. make search that finds something and then make search with short/empty keyword).

core/kernel/db/cat_event_handler.php
1242 ↗(On Diff #374)

Please don't remove this comment.

core/units/categories/categories_event_handler.php
2588 ↗(On Diff #374)

Please don't remove this comment.

core/units/helpers/search_helper.php
832 ↗(On Diff #374)

Please:

  1. locate places where search table name is built manually (not via this method)
  2. make use of this method in these places

There are still 8 places, where search table name is still built manually (not via this method).

This revision now requires changes to proceed.Nov 5 2015, 2:48 AM
erik edited the test plan for this revision. (Show Details)Nov 5 2015, 4:46 AM
erik edited edge metadata.
erik updated this revision to Diff 400.Nov 5 2015, 4:56 AM
erik edited edge metadata.

Used getSearchTable method in additional places

alex accepted this revision.Jan 13 2016, 4:39 AM
alex edited edge metadata.

Keep up the good work.

This revision is now accepted and ready to land.Jan 13 2016, 4:39 AM
alex edited edge metadata.Mar 10 2016, 5:18 AM
alex added a project: Restricted Project.
This revision was automatically updated to reflect the committed changes.