Bugzilla – Attachment 9203 Details for
Bug 3969
Budget Search Doesn't Work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 3969: Budget search in acquisition does't work (search)
SIGNED-OFF-Bug-3969-Budget-search-in-acquisition-d.patch (text/plain), 3.07 KB, created by
Nicole C. Engard
on 2012-04-14 23:02:33 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 3969: Budget search in acquisition does't work (search)
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-04-14 23:02:33 UTC
Size:
3.07 KB
patch
obsolete
>From 60810680bd74a2f5e21086315261afbf7f3eb8c4 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sat, 14 Apr 2012 19:39:30 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 3969: Budget search in acquisition does't work (search) > >Search term was never evaluated. >Patch makes sure input param is correctly stored in the variable >and changes comparison to be case insensitive. > >To test: >- Check search for fund codes (case insensitive) works >- Check search for fund code in combination with library works > >The budgets to be shown can depend on your permissions. >Testing with with a superlibrarian should bring up all funds. > >Also fixes warns in the logs that appeared when viewing the funds >for a budget without funds. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >Funds are now searchable. >--- > admin/aqbudgets.pl | 23 +++++++++++++++++------ > 1 files changed, 17 insertions(+), 6 deletions(-) > >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index db99759..d644892 100755 >--- a/admin/aqbudgets.pl >+++ b/admin/aqbudgets.pl >@@ -74,9 +74,10 @@ my $budget_hash = $input->Vars; > my $budget_id = $$budget_hash{budget_id}; > my $budget_permission = $input->param('budget_permission'); > my $filter_budgetbranch = $input->param('filter_budgetbranch'); >+my $filter_budgetname = $input->param('filter_budgetname'); > #filtering non budget keys > delete $$budget_hash{$_} foreach grep {/filter|^op$|show/} keys %$budget_hash; >-my $filter_budgetname = $input->param('filter_budgetname'); >+ > $template->param( > notree => ($filter_budgetbranch or $show_mine) > ); >@@ -271,9 +272,10 @@ if ($op eq 'add_form') { > } # ...SUPER_LIB END > > # if a budget search doesnt match, next >- if ($filter_budgetname ) { >- next unless $budget->{budget_code} =~ m/$filter_budgetname/ || >- $budget->{name} =~ m/$filter_budgetname/ ; >+ if ($filter_budgetname) { >+ next >+ unless $budget->{budget_code} =~ m/$filter_budgetname/i >+ || $budget->{name} =~ m/$filter_budgetname/i; > } > if ($filter_budgetbranch ) { > next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/; >@@ -325,12 +327,21 @@ if ($op eq 'add_form') { > $budget_period_total = > $num->format_price( $period->{budget_period_total} ); > } >+ >+ if ($period_alloc_total) { >+ $period_alloc_total = $num->format_price($period_alloc_total); >+ } >+ >+ if ($base_spent_total) { >+ $base_spent_total = $num->format_price($base_spent_total); >+ } >+ > $template->param( > else => 1, > budget => \@loop, > budget_period_total => $budget_period_total, >- period_alloc_total => $num->format_price($period_alloc_total), >- base_spent_total => $num->format_price($base_spent_total), >+ period_alloc_total => $period_alloc_total, >+ base_spent_total => $base_spent_total, > branchloop => \@branchloop2, > ); > >-- >1.7.2.3
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 3969
:
6100
|
9198
|
9199
|
9202
|
9203
|
37191
|
37204
|
37206
|
37250