Bugzilla – Attachment 90354 Details for
Bug 22421
accountlines.issue_id is missing a foreign key constraint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22421: Ensure old_issue_id is populated in accountlines
Bug-22421-Ensure-oldissueid-is-populated-in-accoun.patch (text/plain), 1.21 KB, created by
Martin Renvoize (ashimema)
on 2019-06-06 11:45:06 UTC
(
hide
)
Description:
Bug 22421: Ensure old_issue_id is populated in accountlines
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-06-06 11:45:06 UTC
Size:
1.21 KB
patch
obsolete
>From d6ac8e4ee0fd86bf5e94301b32e229d2234d8ceb Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 6 Jun 2019 12:43:51 +0100 >Subject: [PATCH] Bug 22421: Ensure old_issue_id is populated in accountlines > >Update C4::Circulation::MarkIssueReturned to handle moving issue_id to >old_issue_id in accountlines. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 9dd1a23774..73646b5b97 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2182,6 +2182,11 @@ sub MarkIssueReturned { > # Create the old_issues entry > my $old_checkout = Koha::Old::Checkout->new($issue->unblessed)->store; > >+ # Update accountlines >+ my $accountlines = >+ Koha::Account::Lines->search( { issue_id => $issue->issue_id } ); >+ $accountlines->update({ old_issue_id => $issue->issue_id, issue_id => undef }); >+ > # anonymise patron checkout immediately if $privacy set to 2 and AnonymousPatron is set to a valid borrowernumber > if ( $privacy == 2) { > $old_checkout->borrowernumber($anonymouspatron)->store; >-- >2.20.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 22421
:
85773
|
85774
|
85775
|
90352
|
90353
|
90354
|
90359
|
90360
|
90361
|
90362
|
90365
|
90366
|
90367
|
90368
|
161919
|
161920
|
161921
|
161922
|
161923
|
162244
|
162245
|
162246
|
162247
|
162248
|
166631
|
173287
|
173288
|
173289
|
173305
|
173790
|
173791
|
173792
|
173793
|
173794
|
173795
|
173796
|
173797
|
173798
|
173799
|
174281