Bugzilla – Attachment 18985 Details for
Bug 10449
Suggestions pending approval should count only suggestions of current branch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10449 - Suggestions pending approval should count only suggestions of current branch
Bug-10449---Suggestions-pending-approval-should-co.patch (text/plain), 2.18 KB, created by
Kyle M Hall
on 2013-06-14 11:25:07 UTC
(
hide
)
Description:
Bug 10449 - Suggestions pending approval should count only suggestions of current branch
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2013-06-14 11:25:07 UTC
Size:
2.18 KB
patch
obsolete
>From d2a7f0407342d8a5ac5f74b9886b8443047505e3 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Wed, 12 Jun 2013 14:15:12 +0200 >Subject: [PATCH] Bug 10449 - Suggestions pending approval should count only suggestions of current branch > >In intranet main page and acquisition home page, a text can display the number of suggestions pending for approval. When clicking on this like, the suggestions management page is displayed. In this page, by default, only the suggestions of current branch are visible. > >This patch modifies "Suggestions pending approval" count so that when clicking on link, you see the same count in "Pending" tab. > >Test plan : >- Create pending suggestions in several branches >- Connect with user in koha-conf.xml to have no selected branch (you see NO LIBRARY SET) >- On main page, look at "Suggestions pending approval" >- Click on this link >- In suggestions management page, click on "Go" near "Status" >=> You see the same count in "Pending" tab >- Come back to main page >- Select a branch (with pending suggestions) >- On main page, look at "Suggestions pending approval" >- Click on this link >=> You see the same count in "Pending" tab > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Suggestions.pm | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index bf7878b..3c31867 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -364,7 +364,7 @@ sub GetSuggestionByStatus { > > &CountSuggestion($status) > >-Count the number of aqorders with the status given on input argument. >+Count the number of aqorders of current branch and with the status given on input argument. > the arg status can be : > > =over 2 >@@ -408,8 +408,13 @@ sub CountSuggestion { > FROM suggestions > WHERE STATUS=? > }; >+ my @params = ($status); >+ unless ($userenv->{branch} eq 'NO_LIBRARY_SET') { >+ $query .= q{ AND branchcode=? }; >+ push @params, $userenv->{branch}; >+ } > $sth = $dbh->prepare($query); >- $sth->execute($status); >+ $sth->execute(@params); > } > my ($result) = $sth->fetchrow; > return $result; >-- >1.7.2.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 10449
:
18885
| 18985 |
19929