Are you willing to create (at a later stage) a PR for that?
Yes
iTop version
3.2.2-1
PHP version
8.2
Reproduction procedure
Context
When configuring full_text_accelerators with enable_enlarge => false on a class, iTop still renders an empty "0 result" section for that class in the global search results. The section contains only a header (Found 0 object(s) of class X.) with no actionable
button, since the enlarge action is explicitly disabled by configuration.
On instances with several accelerated classes configured this way, the user has to scroll past a stack of dead-end "0 result" sections to reach the classes that actually matched the query.
Steps to reproduce
-
Add the following to conf/production/config-itop.php in $MySettings:
'full_text_accelerators' => array(
'Person' => array(
'query' => 'SELECT Person WHERE name LIKE :needle OR first_name LIKE :needle OR email LIKE :needle',
'attributes' => array('name'),
'enable_enlarge' => false,
),
),
-
Log in to the iTop backoffice.
-
In the global search bar, enter a string that does not match any Person record (e.g. zzzzzz) and press Enter.
-
Expected: no Person section is rendered in the results — there is no actionable content to show.
Actual: a <div class="search-class-result search-class-Person"> block is rendered with the header Found 0 object(s) of class Person. and an empty action area.
Are you willing to create (at a later stage) a PR for that?
Yes
iTop version
3.2.2-1
PHP version
8.2
Reproduction procedure
Context
When configuring
full_text_acceleratorswithenable_enlarge => falseon a class, iTop still renders an empty "0 result" section for that class in the global search results. The section contains only a header (Found 0 object(s) of class X.) with no actionablebutton, since the enlarge action is explicitly disabled by configuration.
On instances with several accelerated classes configured this way, the user has to scroll past a stack of dead-end "0 result" sections to reach the classes that actually matched the query.
Steps to reproduce
Add the following to
conf/production/config-itop.phpin$MySettings:Log in to the iTop backoffice.
In the global search bar, enter a string that does not match any
Personrecord (e.g.zzzzzz) and press Enter.Expected: no
Personsection is rendered in the results — there is no actionable content to show.Actual: a
<div class="search-class-result search-class-Person">block is rendered with the headerFound 0 object(s) of class Person.and an empty action area.