Bugzilla – Attachment 9118 Details for
Bug 7718
Remove itemnumber column from serials table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7718 - itemnumber not populated in the serial table
Bug-7718---itemnumber-not-populated-in-the-serial-.patch (text/plain), 1.12 KB, created by
Kyle M Hall
on 2012-04-11 15:14:56 UTC
(
hide
)
Description:
Bug 7718 - itemnumber not populated in the serial table
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-04-11 15:14:56 UTC
Size:
1.12 KB
patch
obsolete
>From 8efe548a6d83c6c72401570d5db9097e8d6668d0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 11 Apr 2012 11:04:18 -0400 >Subject: [PATCH] Bug 7718 - itemnumber not populated in the serial table > >Modify subroutine C4::Serials::AddItem2Serial to not only >add a line to serialitems, but also to update the itemnumber >in the serial itself. >--- > C4/Serials.pm | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 20ad706..1f0ec62 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -265,8 +265,11 @@ returns the number of rows affected > sub AddItem2Serial { > my ( $serialid, $itemnumber ) = @_; > my $dbh = C4::Context->dbh; >- my $rq = $dbh->prepare("INSERT INTO `serialitems` SET serialid=? , itemnumber=?"); >- $rq->execute( $serialid, $itemnumber ); >+ >+ $dbh->do( 'UPDATE serial SET itemnumber = ? WHERE serialid = ?', undef, $itemnumber, $serialid ); >+ >+ my $rq = $dbh->prepare("INSERT INTO serialitems ( itemnumber, serialid ) VALUES ( ?, ? )"); >+ $rq->execute( $itemnumber, $serialid ); > return $rq->rows; > } > >-- >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 7718
:
9118
|
15031
|
15071
|
15073
|
18304