Bugzilla – Attachment 127811 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 DBIC relationships back into Schema
Bug-29495-Add-DBIC-relationships-back-into-Schema.patch (text/plain), 2.85 KB, created by
Andrew Fuerste-Henry
on 2021-11-18 16:00:43 UTC
(
hide
)
Description:
Bug 29495: Add DBIC relationships back into Schema
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-11-18 16:00:43 UTC
Size:
2.85 KB
patch
obsolete
>From b237dc3a37ad11d313f98c5ee40ee1d0e090ab8d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 17 Nov 2021 10:10:18 +0000 >Subject: [PATCH] Bug 29495: Add DBIC relationships back into Schema > >This patch adds the relationship accessors back into the affected Schema >classes, now below the fold so they are retained during dbic rebuilds. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > Koha/Schema/Result/Issue.pm | 15 +++++++++++++ > Koha/Schema/Result/OldIssue.pm | 15 +++++++++++++ > Koha/Schema/Result/ReturnClaim.pm | 36 +++++++++++++++++++++++++++++++ > 3 files changed, 66 insertions(+) > >diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm >index 87b8d2333e..5d26b5b563 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -373,6 +373,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 return_claim >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::ReturnClaim> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "return_claim", >+ "Koha::Schema::Result::ReturnClaim", >+ { "foreign.issue_id" => "self.issue_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > sub koha_object_class { > 'Koha::Checkout'; > } >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index 83c6db0a21..d119555564 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -343,6 +343,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 return_claim >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::ReturnClaim> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "return_claim", >+ "Koha::Schema::Result::ReturnClaim", >+ { "foreign.issue_id" => "self.issue_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > sub koha_object_class { > 'Koha::Old::Checkout'; > } >diff --git a/Koha/Schema/Result/ReturnClaim.pm b/Koha/Schema/Result/ReturnClaim.pm >index bc4a309de7..89c6f3e114 100644 >--- a/Koha/Schema/Result/ReturnClaim.pm >+++ b/Koha/Schema/Result/ReturnClaim.pm >@@ -280,6 +280,42 @@ __PACKAGE__->belongs_to( > # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-17 10:01:24 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ik93SD3kLNecIyRgsBVKDQ > >+=head2 issue >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Issue> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "issue", >+ "Koha::Schema::Result::Issue", >+ { issue_id => "issue_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ }, >+); >+ >+=head2 old_issue >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::OldIssue> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "old_issue", >+ "Koha::Schema::Result::OldIssue", >+ { issue_id => "issue_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ }, >+); >+ > sub koha_objects_class { > 'Koha::Checkouts::ReturnClaims'; > } >-- >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