Bug 7755 - C4::Items::GetAnalyticsCount needs C4::Search
Summary: C4::Items::GetAnalyticsCount needs C4::Search
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P3 normal
Assignee: Julian Maurice
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks: 7162
  Show dependency treegraph
 
Reported: 2012-03-20 10:59 UTC by Julian Maurice
Modified: 2012-10-25 23:10 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
use C4::Search in C4::Items (797 bytes, patch)
2012-03-20 11:02 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2012-03-20 10:59:43 UTC
GetAnalyticsCount needs some C4::Search subs but there is no 'use C4::Search' in C4::Items.

This can cause GetAnalyticsCount to fail if called in a context where C4::Search is not loaded.

This blocks bug 7162
Comment 1 Julian Maurice 2012-03-20 11:02:42 UTC
Created attachment 8340 [details] [review]
use C4::Search in C4::Items

GetAnalyticsCount needs subs from C4::Search
Comment 2 Magnus Enger 2012-03-23 09:54:07 UTC
How can this be tested? Do you have one or more examples of where GetAnalyticsCount fails, because C4::Search is not loaded?
Comment 3 Julian Maurice 2012-03-23 14:09:29 UTC
Problem was discovered testing the patch for bug 7162 which use C4::Items::DelItemCheck (which use GetAnalyticsCount). I don't know where DelItemCheck is used, but you can apply this patch and patch for bug 7162, and try to cancel an order line (in basket.pl or parcel.pl)
Comment 4 Jonathan Druart 2012-04-06 11:35:39 UTC
C4::Search is already used in C4/Items.pm

use C4::Search qw/SimpleSearch/;
Comment 5 Julian Maurice 2012-04-06 11:42:55 UTC
ok so this patch is not useful anymore. marking as resolved.