Bugzilla – Attachment 127768 Details for
Bug 29495
Issue link is lost in return claims when using 'MarkLostItemsAsReturned'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29495: Add code level constraint replacement
Bug-29495-Add-code-level-constraint-replacement.patch (text/plain), 1.06 KB, created by
Martin Renvoize (ashimema)
on 2021-11-18 07:45:17 UTC
(
hide
)
Description:
Bug 29495: Add code level constraint replacement
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-18 07:45:17 UTC
Size:
1.06 KB
patch
obsolete
>From ac0175caaea948c7cf77deb43108a9d0127f1226 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 17 Nov 2021 10:27:38 +0000 >Subject: [PATCH] Bug 29495: Add code level constraint replacement > >This patch adds a check in Koha::Checkouts::ReturnClaim::store to >replace the database level foreign key check. >--- > Koha/Checkouts/ReturnClaim.pm | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/Koha/Checkouts/ReturnClaim.pm b/Koha/Checkouts/ReturnClaim.pm >index 3488e51626..b8569beea5 100644 >--- a/Koha/Checkouts/ReturnClaim.pm >+++ b/Koha/Checkouts/ReturnClaim.pm >@@ -53,6 +53,16 @@ sub store { > Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy->throw(); > } > >+ unless ( !$self->issue_id >+ || Koha::Checkouts->find( $self->issue_id ) >+ || Koha::Old::Checkouts->find( $self->issue_id ) ) >+ { >+ Koha::Exceptions::Object::FKConstraint->throw( >+ error => 'Broken FK constraint', >+ broken_fk => 'issue_id' >+ ); >+ } >+ > return $self->SUPER::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 29495
:
127711
|
127712
|
127713
|
127714
|
127765
|
127766
|
127767
|
127768
|
127769
|
127809
|
127810
|
127811
|
127812
|
127813
|
127937
|
127938
|
127939
|
127940
|
127941
|
127942
|
127943
|
127944
|
129105
|
129106
|
129107
|
129109
|
129110
|
129111
|
129112
|
129113
|
129547
|
129575
|
129582
|
130460
|
130461
|
130462
|
130463
|
130464
|
130465
|
130466
|
130467
|
130752
|
130753
|
130754
|
130755
|
130756
|
130757
|
130758