Bugzilla – Attachment 185323 Details for
Bug 9762
Log circulation overrides
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9762: (follow-up) Add branchcode to Log circulation and add some override confirmations in action logs, fix typos
Bug-9762-follow-up-Add-branchcode-to-Log-circulati.patch (text/plain), 7.78 KB, created by
Hammat wele
on 2025-08-12 12:27:58 UTC
(
hide
)
Description:
Bug 9762: (follow-up) Add branchcode to Log circulation and add some override confirmations in action logs, fix typos
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-08-12 12:27:58 UTC
Size:
7.78 KB
patch
obsolete
>From 868cb20990efdd16ed66774588cb42a50913d6e6 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Tue, 5 Aug 2025 12:31:11 +0000 >Subject: [PATCH] Bug 9762: (follow-up) Add branchcode to Log circulation and > add some override confirmations in action logs, fix typos > >--- > C4/Circulation.pm | 3 ++- > circ/circulation.pl | 3 ++- > .../prog/en/includes/action-logs.inc | 20 +++++++++++++++++-- > .../prog/en/modules/tools/viewlog.tt | 6 +++--- > svc/renew | 5 ++++- > tools/viewlog.pl | 1 + > 6 files changed, 30 insertions(+), 8 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index b3eb4c1f85a..1998f976738 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1995,6 +1995,7 @@ sub AddIssue { > $info = to_json( > { > issue => $issue->issue_id, >+ branchcode => $issue->branchcode, > itemnumber => $item_object->itemnumber, > confirmations => $confirmations, > forced => $forced >@@ -3663,7 +3664,7 @@ sub AddRenewal { > }, > { > pretty => 1, >- cononical => 1 >+ canonical => 1 > } > ); > } >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 1597852c59d..87257839a88 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -444,7 +444,7 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > } > } > >- delete $needsconfirmation->{'DEBT'} if ($debt_confirmed); >+ my $needsconfirmationDEBT = delete $needsconfirmation->{'DEBT'} if ($debt_confirmed); > > if ( $item && C4::Context->preference('ClaimReturnedLostValue') ) { > my $autoClaimReturnCheckout = C4::Context->preference('AutoClaimReturnStatusOnCheckout'); >@@ -547,6 +547,7 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) { > $datedue = $booked->end_date; > } >+ $needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); > my $issue = AddIssue( > $patron, $barcode, $datedue, > $cancelreserve, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >index 34f94df8490..c43f2668468 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >@@ -198,7 +198,7 @@ > [% CASE 'PATRON_CANT' %] > <span>Max renewals reached</span> > [% CASE 'TOO_MANY' %] >- <span>Max renewals reached</span> >+ <span>Too many checkout</span> > [% CASE 'PREVISSUE' %] > <span>Patron was notified of previous issues</span> > [% CASE 'NOT_FOR_LOAN' %] >@@ -226,11 +226,27 @@ > [% CASE 'BOOKED_TO_ANOTHER' %] > <span>Item was booked to another patron</span> > [% CASE 'AGE_RESTRICTION' %] >- <span>Item has an eage restriction</span> >+ <span>Item has an age restriction</span> > [% CASE 'HIGHHOLDS' %] > <span>Item had high holds</span> > [% CASE 'BIBLIO_ALREADY_ISSUED' %] > <span>Biblio was already issued</span> >+ [% CASE 'DEBARRED' %] >+ <span>Patron is restricted</span> >+ [% CASE 'RENEWAL_LIMIT' %] >+ <span>Renewal limit override</span> >+ [% CASE 'UNSEEN_LIMIT' %] >+ <span>Override unseen item restriction</span> >+ [% CASE 'AUTO_TOO_SOON' %] >+ <span>Override auto-renew too soon restriction</span> >+ [% CASE 'AUTO_TOO_LATE' %] >+ <span>Override auto-renew too late restriction</span> >+ [% CASE 'ACCOUNT_EXPIRED' %] >+ <span>Account expired override</span >+ [% CASE 'ON_RESERVE' %] >+ <span>Override Renew hold for another</span> >+ [% CASE 'TOO_MUCH' %] >+ <span>Override auto-renew too much owing restriction</span> > [% CASE %] > <span>[% override | html %]</span> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index a53132ea91d..44e6e4b20e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -339,11 +339,11 @@ > <a > href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.json.itemnumber | uri %]&biblionumber=[% loopro.json.biblionumber | uri %]&bi=[% loopro.json.biblioitemnumber | uri %]#item[% loopro.json.itemnumber | uri %]" > title="Display detail for this item" >- >Item [% loopro.json.barcode | html %]</a >+ >Item [% loopro.json.barcode | html %] [% loopro.json.branchcode | html %]</a > > > </div> >- [% FOREACH force IN loopro.json.forces %] >- <div class="forced"> [% PROCESS translare_log_override override=force %] </div> >+ [% FOREACH force IN loopro.json.forced %] >+ <div class="forced"> [% PROCESS translate_log_override override=force %] </div> > [% END %] > [% FOREACH confirmation IN loopro.json.confirmations %] > <div class="confirmed"> [% PROCESS translate_log_override override=confirmation %] </div> >diff --git a/svc/renew b/svc/renew >index 9f0543268dd..a2877d5f7fa 100755 >--- a/svc/renew >+++ b/svc/renew >@@ -67,6 +67,7 @@ $data->{branchcode} = $branchcode; > my $patron = Koha::Patrons->find($borrowernumber); > my $item = Koha::Items->find($itemnumber); > >+my $confirmations; > ( $data->{renew_okay}, $data->{error} ) = > CanBookBeRenewed( $patron, $item->checkout, $override_limit ); > >@@ -75,6 +76,7 @@ if ( $data->{error} && $data->{error} eq 'on_reserve' && C4::Context->preference > $data->{renew_okay} = 1; > $data->{error} = undef; > >+ push @{$confirmations}, 'ON_RESERVE' if $override_limit; > $message = "Override Renew hold for another"; > @message = ("Override Renew hold for another"); > >@@ -133,7 +135,8 @@ if ( $data->{renew_okay} || ( $seen && $data->{error} eq 'too_unseen' ) ) { > itemnumber => $itemnumber, > branch => $branchcode, > datedue => $date_due, >- seen => $seen >+ seen => $seen, >+ confirmations => $confirmations > } > ); > $data->{date_due} = output_pref( { dt => $date_due, as_due_date => 1 } ); >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index 5d5341168f4..2655b2e8fbb 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -181,6 +181,7 @@ if ($do_it) { > $decoded->{biblionumber} = $item->biblionumber; > $decoded->{biblioitemnumber} = $item->biblionumber; > $decoded->{barcode} = $item->barcode; >+ $decoded->{branchcode} = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; > } > $result->{'json'} = $decoded; > } else { >-- >2.34.1
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 9762
:
149554
|
156222
|
163847
|
164022
|
164067
|
164068
|
164302
|
164387
|
164426
|
164479
|
164508
|
164509
|
164510
|
164519
|
170271
|
170272
|
170273
|
176742
|
177294
|
177295
|
177296
|
178029
|
178030
|
178031
|
178036
|
181303
|
181304
|
181305
|
181306
|
181307
|
181308
|
181340
|
181341
|
181342
|
181343
|
181344
|
181345
|
181346
|
181357
|
181358
|
181359
|
181360
|
181361
|
181362
|
181363
|
181371
|
181381
|
181390
|
181393
|
181545
|
181546
|
185118
|
185314
|
185315
|
185316
|
185317
|
185318
|
185319
|
185320
|
185321
|
185322
| 185323