Bugzilla – Attachment 116768 Details for
Bug 27683
Bind results of GetAnalyticsCount to the EasyAnalyticalRecords pref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27683: Bind results of GetAnalyticsCount to the EasyAnalyticalRecords pref
Bug-27683-Bind-results-of-GetAnalyticsCount-to-the.patch (text/plain), 1.31 KB, created by
Fridolin Somers
on 2021-02-11 15:34:26 UTC
(
hide
)
Description:
Bug 27683: Bind results of GetAnalyticsCount to the EasyAnalyticalRecords pref
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2021-02-11 15:34:26 UTC
Size:
1.31 KB
patch
obsolete
>From c38c1ff1f064fc72d949461fda67bd02165236f1 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 11 Feb 2021 15:33:35 +0100 >Subject: [PATCH] Bug 27683: Bind results of GetAnalyticsCount to the > EasyAnalyticalRecords pref > >C4::Items::GetAnalyticsCount is part of the easy analytics feature. >Like Bug 20702 make early return when the system preference EasyAnalyticalRecords is disabled. >Actually it may block an item deletion for wrong reason. > >Test plan : >1) Dont apply patch >2) Build an item and a linked analytical record with 773$0 and $9 >3) Enable EasyAnalyticalRecords >4) Try to delete the item >5) You have an alert because linked to analytics >6) Disable EasyAnalyticalRecords >7) Try to delete the item >8) You have an alert because linked to analytics >9) Apply patch >10) Try to delete the item >11) No alert, it works :D >--- > C4/Items.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 48aed7b195..691dca0b67 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1304,6 +1304,10 @@ counts Usage of itemnumber in Analytical bibliorecords. > sub GetAnalyticsCount { > my ($itemnumber) = @_; > >+ if ( !C4::Context->preference('EasyAnalyticalRecords') ) { >+ return 0; >+ } >+ > ### ZOOM search here > my $query; > $query= "hi=".$itemnumber; >-- >2.30.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27683
:
116767
|
116768
|
116769
|
127839
|
127840
|
127841
|
137447
|
137448
|
137449
|
137700
|
137701
|
137702