glpi icon indicating copy to clipboard operation
glpi copied to clipboard

Streamline Search::show logic

Open cconard96 opened this issue 3 years ago • 1 comments

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -

  • Move logic for Search::show to new classes.
  • Improved handling of Map HTML output by adding a new prepareInputParams method for search output classes. This allows forcing some criteria so the location fields are included in the Map view
  • Added showPreSearchDisplay method for search output classes to handle showing widgets before the search input form such as the mini dashboard shown for the HTML output for Tickets
  • Unified the method naming for displaying/outputting the results
  • Moved the remaining method logic left in Search

cconard96 avatar Sep 18 '22 18:09 cconard96

Is there a reason to keep errors in new methods names? datas is not correct, new methods should be correct I guess :)

Also, I think tests should be added on new class/methods (well, when it's possible, I keep in mind Search is a very huge part); doing that later would be a too huge job.

trasher avatar Sep 26 '22 12:09 trasher

@cconard96 please rebase to fix tests.

cedric-anne avatar Oct 14 '22 10:10 cedric-anne