Bugzilla – Attachment 53737 Details for
Bug 16942
Confirm hold results in ugly error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 16942 - Confirm hold results in ugly error
PASSED-QA-Bug-16942---Confirm-hold-results-in-ugly.patch (text/plain), 1.73 KB, created by
Katrin Fischer
on 2016-07-26 19:54:36 UTC
(
hide
)
Description:
[PASSED QA] Bug 16942 - Confirm hold results in ugly error
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-07-26 19:54:36 UTC
Size:
1.73 KB
patch
obsolete
>From e19503b1f719ff881a3dcd959a47674585524606 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 19 Jul 2016 16:57:25 +0000 >Subject: [PATCH] [PASSED QA] Bug 16942 - Confirm hold results in ugly error > >Confirming a hold to set it to waiting will result in an DBIC error in >master. > >Test Plan: >1) Attempt to check in an item on hold and confirm the hold >2) Note the error >3) Apply this patch >4) Repeat step 1 >5) Note there is no error! > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> > >https://bugs.koha-community.org/show_bug.cgi?id=14942 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Letters.pm | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 737c8cd..cdf0860 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1485,7 +1485,15 @@ sub _get_tt_params { > my $id = ref $ref eq 'HASH' ? $tables->{$table}->{$pk} : $tables->{$table}; > my $object; > if ( $fk ) { # Using a foreign key for lookup >- $object = $module->search( { $fk => $id } )->next(); >+ if ( ref( $fk ) eq 'ARRAY' ) { # Foreign key is multi-column >+ my $search; >+ foreach my $key ( @$fk ) { >+ $search->{$key} = $id->{$key}; >+ } >+ $object = $module->search( $search )->next(); >+ } else { # Foreign key is single column >+ $object = $module->search( { $fk => $id } )->next(); >+ } > } else { # using the table's primary key for lookup > $object = $module->find($id); > } >-- >1.9.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 16942
:
53497
|
53499
|
53726
|
53737
|
53738
|
54569
|
54570