Bugzilla – Attachment 28263 Details for
Bug 12257
Suggestions management displays all librarians as "Unknown"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12257 - Tidy GetCriteriumDesc
Bug-12257---Tidy-GetCriteriumDesc.patch (text/plain), 2.33 KB, created by
Kyle M Hall (khall)
on 2014-05-14 15:36:39 UTC
(
hide
)
Description:
Bug 12257 - Tidy GetCriteriumDesc
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-05-14 15:36:39 UTC
Size:
2.33 KB
patch
obsolete
>From 47fbfe84cc47c45bea0b609b3b6697679b119498 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 14 May 2014 11:35:56 -0400 >Subject: [PATCH] Bug 12257 - Tidy GetCriteriumDesc > >--- > suggestion/suggestion.pl | 29 ++++++++++++++++++++--------- > 1 files changed, 20 insertions(+), 9 deletions(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 323ad12..26dc451 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -57,28 +57,39 @@ sub Init{ > $suggestion->{'branchcode'}=C4::Context->userenv->{"branch"} unless ($suggestion->{'branchcode'}); > } > >-sub GetCriteriumDesc{ >- my ($criteriumvalue,$displayby)=@_; >+sub GetCriteriumDesc { >+ my ( $criteriumvalue, $displayby ) = @_; > >- if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){ >- my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); >+ if ( $displayby =~ /suggestedby/ >+ || $displayby =~ /managedby/ >+ || $displayby =~ /acceptedby/ ) >+ { >+ my $borr = C4::Members::GetMember( borrowernumber => $criteriumvalue ); > return "" unless $borr; > return $$borr{surname} . ", " . $$borr{firstname}; > } > >- if ( $displayby =~ /budgetid/) { >+ if ( $displayby =~ /budgetid/ ) { > my $budget = GetBudget($criteriumvalue); > return "" unless $budget; > return $$budget{budget_name}; > } > > unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED) ) { >- return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || "Unknown"; >+ return GetAuthorisedValueByCode( 'SUGGEST_STATUS', $criteriumvalue ) >+ || "Unknown"; >+ } >+ >+ if ( $displayby =~ /status/i ) { >+ return ( >+ $criteriumvalue eq 'ASKED' >+ ? "Pending" >+ : ucfirst( lc($criteriumvalue) ) >+ ); > } > >- return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); >- return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); >- return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); >+ return ( GetBranchName($criteriumvalue) ) if ( $displayby =~ /branchcode/ ); >+ return ( GetSupportName($criteriumvalue) ) if ( $displayby =~ /itemtype/ ); > } > > my $input = CGI->new; >-- >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 12257
:
28262
| 28263