Bugzilla – Attachment 96490 Details for
Bug 24242
Funds with no library assigned do not appear on edit suggestions page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24242: Display funds that the logged in user can access - suggestions
Bug-24242-Display-funds-that-the-logged-in-user-ca.patch (text/plain), 3.05 KB, created by
ByWater Sandboxes
on 2019-12-19 16:07:39 UTC
(
hide
)
Description:
Bug 24242: Display funds that the logged in user can access - suggestions
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2019-12-19 16:07:39 UTC
Size:
3.05 KB
patch
obsolete
>From 0d096a55416d9b6e11f339da25e93cb9972b91ad Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 15 Dec 2019 12:32:34 +0100 >Subject: [PATCH] Bug 24242: Display funds that the logged in user can access - > suggestions > >The design of this script is pretty bad and any modifications is a >challenge. >Here we are trying to display to display the funds available for the >logged in user. I did not understand previous code, as we are doing a >limit using CanUserUseBudget, I do not think it makes sense to retrieve >funds for a given library. >Also, I am wondering if the dropdown list in the filters has ever been >populated: budgetid_loop in the template *never* appeared in the history >of suggestion.pl (??) > >Test plan: >Search for suggestions >Add/edit suggestions >=> The funds in the dropdown list should be the ones the logged in user >can use. > >Signed-off-by: hc <hc@interleaf.ie> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 4 ++-- > suggestion/suggestion.pl | 9 +-------- > 2 files changed, 3 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 30ab2b46b9..38e5410bd0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -745,8 +745,8 @@ > [% ELSE %] > <option value="__NONE__">None</option> > [% END %] >- [% FOREACH budgetid_loo IN budgetid_loop %] >- [% IF ( budgetid_loo.selected ) %] <option value="[% budgetid_loo.code | html %]" selected="selected">[% budgetid_loo.desc | html %]</option>[% ELSE %]<option value="[% budgetid_loo.code | html %]">[% budgetid_loo.desc | html %]</option>[% END %] >+ [% FOREACH budgetsloo IN budgetsloop %] >+ [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %] > [% END %] > </select></li> > <li><label for="branchcode">Library:</label> >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index ef153ba88b..8c3056e807 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -351,14 +351,7 @@ my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG"); > $template->param(patron_reason_loop=>$patron_reason_loop); > > #Budgets management >-my $budgets = []; >-if ($branchfilter) { >- my $searchbudgets = { budget_branchcode => $branchfilter }; >- $budgets = GetBudgets($searchbudgets); >-} else { >- $budgets = GetBudgets(undef); >-} >- >+my $budgets = GetBudgets; > my @budgets_loop; > foreach my $budget ( @{$budgets} ) { > next unless (CanUserUseBudget($borrowernumber, $budget, $userflags)); >-- >2.11.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 24242
:
96292
|
96490
|
96577