Bugzilla – Attachment 130757 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]
[21.05.x] Bug 29495: Update relationship methods
2105x-Bug-29495-Update-relationship-methods.patch (text/plain), 2.40 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-02-17 15:23:31 UTC
(
hide
)
Description:
[21.05.x] Bug 29495: Update relationship methods
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-02-17 15:23:31 UTC
Size:
2.40 KB
patch
obsolete
>From 033d441b6e7a7c212735df11931fd2783ee4ccdf Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 18 Nov 2021 07:43:44 +0000 >Subject: [PATCH] [21.05.x] Bug 29495: Update relationship methods > >This patch updates the relationship methods found in >Koha::Checkouts::ReturnClaim so that they are prefetchable and embeddable on >the API. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Checkouts/ReturnClaim.pm | 17 ++++++++++++++--- > Koha/Schema/Result/ReturnClaim.pm | 8 ++++---- > 2 files changed, 18 insertions(+), 7 deletions(-) > >diff --git a/Koha/Checkouts/ReturnClaim.pm b/Koha/Checkouts/ReturnClaim.pm >index 78341e629a..c95c099a44 100644 >--- a/Koha/Checkouts/ReturnClaim.pm >+++ b/Koha/Checkouts/ReturnClaim.pm >@@ -72,10 +72,21 @@ sub store { > sub checkout { > my ($self) = @_; > >- my $checkout = Koha::Checkouts->find( $self->issue_id ) >- || Koha::Old::Checkouts->find( $self->issue_id ); >+ my $checkout_rs = $self->_result->checkout; >+ return unless $checkout_rs; >+ return Koha::Checkout->_new_from_dbic($checkout_rs); >+} >+ >+=head3 old_checkout >+ >+=cut >+ >+sub old_checkout { >+ my ($self) = @_; > >- return $checkout; >+ my $old_checkout_rs = $self->_result->old_checkout; >+ return unless $old_checkout_rs; >+ return Koha::Old::Checkout->_new_from_dbic($old_checkout_rs); > } > > =head3 patron >diff --git a/Koha/Schema/Result/ReturnClaim.pm b/Koha/Schema/Result/ReturnClaim.pm >index 89c6f3e114..4e2c56c40b 100644 >--- a/Koha/Schema/Result/ReturnClaim.pm >+++ b/Koha/Schema/Result/ReturnClaim.pm >@@ -280,7 +280,7 @@ __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 >+=head2 checkout > > Type: belongs_to > >@@ -289,7 +289,7 @@ Related object: L<Koha::Schema::Result::Issue> > =cut > > __PACKAGE__->belongs_to( >- "issue", >+ "checkout", > "Koha::Schema::Result::Issue", > { issue_id => "issue_id" }, > { >@@ -298,7 +298,7 @@ __PACKAGE__->belongs_to( > }, > ); > >-=head2 old_issue >+=head2 old_checkout > > Type: belongs_to > >@@ -307,7 +307,7 @@ Related object: L<Koha::Schema::Result::OldIssue> > =cut > > __PACKAGE__->belongs_to( >- "old_issue", >+ "old_checkout", > "Koha::Schema::Result::OldIssue", > { issue_id => "issue_id" }, > { >-- >2.32.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 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