Bugzilla – Attachment 107124 Details for
Bug 25998
Add 'library' relation to Koha::Account::Line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25998: (QA follow-up) Add DBIC level relation
Bug-25998-QA-follow-up-Add-DBIC-level-relation.patch (text/plain), 1.65 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-07-20 17:27:48 UTC
(
hide
)
Description:
Bug 25998: (QA follow-up) Add DBIC level relation
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-07-20 17:27:48 UTC
Size:
1.65 KB
patch
obsolete
>From b140dc5be30583e53e93b37b83e10206595f1c65 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 17 Jul 2020 07:44:45 +0100 >Subject: [PATCH] Bug 25998: (QA follow-up) Add DBIC level relation > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Account/Line.pm | 2 +- > Koha/Schema/Result/Accountline.pm | 20 ++++++++++++++++++++ > 2 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index ce00de0623..7ed59a9ed0 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -93,7 +93,7 @@ Returns a Koha::Library object representing where the accountline was recorded > > sub library { > my ( $self ) = @_; >- my $rs = $self->_result->branchcode; >+ my $rs = $self->_result->library; > return unless $rs; > return Koha::Library->_new_from_dbic($rs); > } >diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm >index 12bb08c17e..2b14943d34 100644 >--- a/Koha/Schema/Result/Accountline.pm >+++ b/Koha/Schema/Result/Accountline.pm >@@ -370,6 +370,26 @@ __PACKAGE__->belongs_to( > # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-19 09:20:20 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BuE4CYsSH4BwXZoQKE2MWw > >+=head2 library >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "library", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > sub koha_objects_class { > 'Koha::Account::Lines'; > } >-- >2.27.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 25998
:
106945
|
106971
|
106972
|
106973
|
107122
|
107123
| 107124