Bugzilla – Attachment 3423 Details for
Bug 4811
suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
New Patch
0001-BUG-4811-suggestion.pl-display-borrowers-name-in-sug.patch (text/plain), 3.62 KB, created by
Chris Cormack
on 2011-03-24 21:00:06 UTC
(
hide
)
Description:
New Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-24 21:00:06 UTC
Size:
3.62 KB
patch
obsolete
>From 6e0d427d688438ecdc900ef7644fe06222a88d04 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Tue, 25 May 2010 14:40:59 +0200 >Subject: [PATCH] (BUG #4811) suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by) > >--- > C4/Search.pm | 2 +- > suggestion/suggestion.pl | 25 ++++++++++++++++++++++++- > 2 files changed, 25 insertions(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index cd970b7..162159d 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2662,7 +2662,7 @@ sub GetDistinctValues { > my ($table,$column)=split /\./, $fieldname; > my $dbh = C4::Context->dbh; > warn "select DISTINCT($column) as value, count(*) as cnt from $table group by lib order by $column " if $DEBUG; >- my $sth = $dbh->prepare("select DISTINCT($column) as value, count(*) as cnt from $table ".($string?" where $column like \"$string%\"":"")."group by value order by $column "); >+ my $sth = $dbh->prepare("select DISTINCT($column) as value, count(*) as cnt from $table where $column is not null ".($string?" and $column like \"$string%\"":"")." group by value order by $column "); > $sth->execute; > my $elements=$sth->fetchall_arrayref({}); > return $elements; >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 5aca561..1668958 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -56,7 +56,7 @@ sub GetCriteriumDesc{ > return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); > return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); > return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); >- if ($displayby =~/managedby/||$displayby =~/acceptedby/){ >+ if ( $displayby =~ /managedby/ || $displayby =~ /acceptedby/ || $displayby =~ /suggestedby/) { > my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); > return "" unless $borr; > return $$borr{firstname} . ", " . $$borr{surname}; >@@ -125,6 +125,7 @@ elsif ($op=~/edit/) { > #Edit suggestion > $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); > Init($suggestion_ref); >+<<<<<<< HEAD > $op ='save'; > } > elsif ($op eq "change" ) { >@@ -146,6 +147,28 @@ elsif ($op eq "change" ) { > foreach (keys %$suggestion_ref){ > delete $$suggestion_ref{$_} unless ($$suggestion_ref{$_}); > } >+======= >+ $op = 'save'; >+} elsif ( $op eq "change" ) { >+ if ( $$suggestion_ref{"STATUS"} ) { >+ if ( my $tmpstatus = lc( $$suggestion_ref{"STATUS"} ) =~ /ACCEPTED|REJECTED/i ) { >+ $$suggestion_ref{ lc( $$suggestion_ref{"STATUS"}) . "date" } = C4::Dates->today; >+ $$suggestion_ref{ lc( $$suggestion_ref{"STATUS"}) . "by" } = C4::Context->userenv->{number}; >+ } >+ $$suggestion_ref{"manageddate"} = C4::Dates->today; >+ $$suggestion_ref{"managedby"} = C4::Context->userenv->{number}; >+ } >+ if ( my $reason = $$suggestion_ref{"reason$tabcode"} ) { >+ if ( $reason eq "other" ) { >+ $reason = $$suggestion_ref{"other_reason$tabcode"}; >+ } >+ $$suggestion_ref{'reason'} = $reason; >+ } >+ delete $$suggestion_ref{$_} foreach ( "reason$tabcode", "other_reason$tabcode" ); >+ foreach ( keys %$suggestion_ref ) { >+ delete $$suggestion_ref{$_} unless ( $$suggestion_ref{$_} ); >+ } >+>>>>>>> (BUG #4811) suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by) > foreach my $suggestionid (@editsuggestions) { > next unless $suggestionid; > $$suggestion_ref{'suggestionid'}=$suggestionid; >-- >1.7.1 >
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 4811
:
2164
| 3423