Bugzilla – Attachment 173792 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.37 KB, created by
Martin Renvoize (ashimema)
on 2024-10-31 13:14:47 UTC
(
hide
)
Description:
Bug 22421: Ensure old_issue_id is populated in accountlines
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-31 13:14:47 UTC
Size:
1.37 KB
patch
obsolete
>From f6c56f6028fce695c49d5fe5eefbdc2e27427831 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> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >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 58946ae12a3..64d2b5176ab 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2650,6 +2650,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 && $privacy == 2) { > $old_checkout->anonymize; >-- >2.47.0
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