Bug 20919: Remove unecessary search calls on the biblio detail page
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 14 Jun 2018 14:31:02 +0000 (11:31 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 30 Jul 2018 12:37:18 +0000 (14:37 +0200)
commitb470ea71cc67eeba2c942f65cb67331ec38eb7ed
tree3f86917c71256b857cc97f931372d5db54878444
parentf09fbab4c85c38992a2638d4ce7a9a26ab7c352b
Bug 20919: Remove unecessary search calls on the biblio detail page

There is a countanalytics flag that is set for items used in analytical
biblio records. This flag is only used in the template when 'analyze'
has been passed to the script.
In order to avoid unecessary search calls (1 per item), $analyse must be
tested.

Test plan:
0. Do not apply the patch
1. tail -f /var/log/koha/kohadev/zebra-output.log
2. Hit a bibliographic record detail page with several items
3. Notice that the log has 1 line per item:
  11:30:36-14/06 zebrasrv(32) [warn] ir_session (exception)
4. Apply the patch
5. Hit the page again
6. There is nothing in the zebra log file

If you are familiar with analytic records, confirm that you are not
allowed to remove an item that is used in analytical biblio records.

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e4b51adb9a46c72099b950b1976c155f3c7d41f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
catalogue/detail.pl