Bugzilla – Attachment 167687 Details for
Bug 30493
Pending archived suggestions appear on staff interface home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30493: Pending archived suggestions appear on intranet home page
Bug-30493-Pending-archived-suggestions-appear-on-i.patch (text/plain), 3.17 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-06-13 15:04:27 UTC
(
hide
)
Description:
Bug 30493: Pending archived suggestions appear on intranet home page
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2024-06-13 15:04:27 UTC
Size:
3.17 KB
patch
obsolete
>From 91b9968347de1818c6030dc01f41f447806bb137 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Thu, 13 Jun 2024 15:36:18 +0200 >Subject: [PATCH] Bug 30493: Pending archived suggestions appear on intranet > home page > >If suggestions are archived before their status is changed to something other than "Pending", they still appear on the intranet home page and the acquisitions home page as suggestions to be managed. > >WITHOUT PATCH: >1. Go to Acquisitions > Suggestions >2. Click on New purchase suggestion >3. Fill in the form (title only is fine) >4. Click on Submit your suggestion >5. Go to the home page (click the Koha logo) > --> Notice it says that there is 1 pending suggestion >6. Go to Acquisitions > --> Notice it says that there is 1 pending suggestion >7. Go to Suggestions >8. Click on the up arrow to the right of the Edit button and choose Archive > --> There are no more pending suggestions >9. Go to the home page (click the Koha logo) > --> Notice it says that there is 1 pending suggestion >10. Go to Acquisitions > --> Notice it says that there is 1 pending suggestion > >The search function was fetching suggestions without considering the >"archived" field. I now pick only suggestion that are pending AND not >archived. > >WITH PATCH: >9. Go to the home page (click the Koha logo) > --> Notice it says that there is no pending suggestion >10. Go to Acquisitions > --> Notice it says that there is no pending suggestion >--- > acqui/acqui-home.pl | 2 +- > mainpage.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index 8e679727ad..f6ed46c454 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -53,7 +53,7 @@ if( C4::Context->only_my_library ){ > my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); > $template->param( suggestions_count => $local_pendingsuggestions_count ); > } else { >- my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); >+ my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); > my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count(); > my $pendingsuggestions_count = $pendingsuggestions->count(); > $template->param( >diff --git a/mainpage.pl b/mainpage.pl >index 855913ae72..58576e6fc2 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -89,7 +89,7 @@ if( C4::Context->only_my_library ){ > my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); > $template->param( pendingsuggestions => $local_pendingsuggestions_count ); > } else { >- my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); >+ my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); > my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count(); > my $pendingsuggestions_count = $pendingsuggestions->count(); > $template->param( >-- >2.43.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 30493
:
167686
|
167687
|
167689
|
167760
|
167761