Bugzilla – Attachment 190840 Details for
Bug 30849
Make 'pending patron modification notices' on staff home page 'number of modifications at logged in library'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30849: show pending modifications by branch
Bug-30849-show-pending-modifications-by-branch.patch (text/plain), 5.72 KB, created by
Lucas Gass (lukeg)
on 2026-01-02 17:16:27 UTC
(
hide
)
Description:
Bug 30849: show pending modifications by branch
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-01-02 17:16:27 UTC
Size:
5.72 KB
patch
obsolete
>From e52eaa7c9b4bcc36c507d455ed3124199507b4ad Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 8 Jun 2022 16:05:30 +0000 >Subject: [PATCH] Bug 30849: show pending modifications by branch > >To test: >1. Add some borrower modifications from the OPAC from patrons that belong to some different libraries. >2. On the staff client mainpage (mainpage.pl) you should see a link 'Patrons requesting modifications:' but no way of knowing if they are patrons from your logged in branch or not >3. Apply patch, restart_all >4. Try step 2 again and now you should see something like 'Patrons requesting modifications: Centerville: 1 / All libraries: 2'; >5. Turn on IndependentBranchesPatronModifications. >6. Log in as a superlibrarian, you should see branch specific and All libraries requests. >7. Log in as a non-superlibrarian, you should only see requests for your branch. >8. Trying and and fulfilling some modifcations and make sure the numbers on mainpage.pl are always correct. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > .../prog/en/modules/intranet-main.tt | 29 +++++++++++++++---- > mainpage.pl | 10 +++++-- > 2 files changed, 31 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index fe5e0597aaa..740713c5640 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -224,11 +224,30 @@ > </div> > [% END %] > >- [% IF ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) %] >- <div class="pending-info" id="patron_updates_pending"> >- <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>: >- <span class="pending-number-link">[% pending_borrower_modifications | html %]</span> >- </div> >+ [% IF CAN_user_borrowers_edit_borrowers && pending_borrower_modifications %] >+ [% IF Koha.Preference('IndependentBranchesPatronModifications') && !CAN_user_superlibrarian %] >+ [% IF pending_local_borrowermods %] >+ <div class="pending-info" id="patron_updates_pending"> >+ Patrons requesting modifications: >+ <a href="/cgi-bin/koha/members/members-update.pl"> >+ <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pending_local_borrowermods | html %]</span> >+ </a> >+ </div> >+ [% END %] >+ [% ELSE %] >+ <div class="pending-info" id="patron_updates_pending"> >+ Patrons requesting modifications: >+ [% IF pending_local_borrowermods %] >+ <a href="/cgi-bin/koha/members/members-update.pl"> >+ <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pending_local_borrowermods | html %]</span> >+ </a> >+ / >+ [% END %] >+ <a href="/cgi-bin/koha/members/members-update.pl"> >+ <span class="pending-number-link">All libraries: [% pending_borrower_modifications | html %]</span> >+ </a> >+ </div> >+ [% END %] > [% END %] > > [% IF CAN_user_borrowers_edit_borrowers && pending_discharge_requests %] >diff --git a/mainpage.pl b/mainpage.pl >index 21a1ad3c445..f6b7fe9dbb6 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -37,6 +37,7 @@ use Koha::Suggestions; > use Koha::BackgroundJobs; > use Koha::CurbsidePickups; > use Koha::Tickets; >+use Koha::Token; > > my $query = CGI->new; > >@@ -102,9 +103,11 @@ if ( C4::Context->only_my_library ) { > ); > } > >-my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count($branch); >-my $pending_discharge_requests = Koha::Patron::Discharge::count( { pending => 1 } ); >-my $pending_article_requests = Koha::ArticleRequests->search_limited( >+my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count($branch); >+my $local_pendingmodifications_count = Koha::Patron::Modifications->pending_count( C4::Context->userenv()->{'branch'} ); >+ >+my $pending_discharge_requests = Koha::Patron::Discharge::count( { pending => 1 } ); >+my $pending_article_requests = Koha::ArticleRequests->search_limited( > { > status => Koha::ArticleRequest::Status::Requested, > $branch ? ( 'me.branchcode' => $branch ) : (), >@@ -157,6 +160,7 @@ $template->param( > pendingcomments => $pendingcomments, > pendingtags => $pendingtags, > pending_borrower_modifications => $pending_borrower_modifications, >+ pending_local_borrowermods => $local_pendingmodifications_count, > pending_discharge_requests => $pending_discharge_requests, > pending_article_requests => $pending_article_requests, > pending_problem_reports => $pending_problem_reports, >-- >2.39.5
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 30849
:
135823
|
137644
|
190826
|
190828
|
190840
|
190842