Bugzilla – Attachment 100472 Details for
Bug 20936
Holds history for patrons in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20936: Add koha_object_class and koha_objects_class methods to Schema classes
Bug-20936-Add-kohaobjectclass-and-kohaobjectsclass.patch (text/plain), 3.48 KB, created by
Agustín Moyano
on 2020-03-10 18:32:46 UTC
(
hide
)
Description:
Bug 20936: Add koha_object_class and koha_objects_class methods to Schema classes
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2020-03-10 18:32:46 UTC
Size:
3.48 KB
patch
obsolete
>From 8b36722b1651bfe13d1261f03ece7cd34ecafcbf Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Tue, 10 Mar 2020 15:21:04 -0300 >Subject: [PATCH] Bug 20936: Add koha_object_class and koha_objects_class > methods to Schema classes > >--- > Koha/Schema/Result/Biblio.pm | 20 ++++++++ > Koha/Schema/Result/Item.pm | 27 +++++++++++ > Koha/Schema/Result/OldReserve.pm | 79 ++++++++++++++++++++++++++++++++ > 3 files changed, 126 insertions(+) > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 7c66b1dc03..b6ef833bec 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -428,4 +428,24 @@ __PACKAGE__->add_columns( > "+serial" => { is_boolean => 1 } > ); > >+=head2 koha_objects_class >+ >+Returns related Koha::Objects class name >+ >+=cut >+ >+sub koha_objects_class { >+ 'Koha::Biblios'; >+} >+ >+=head2 koha_object_class >+ >+Returns related Koha::Object class name >+ >+=cut >+ >+sub koha_object_class { >+ 'Koha::Biblio'; >+} >+ > 1; >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 58cddf4502..798cd08a2f 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -759,6 +759,13 @@ __PACKAGE__->belongs_to( > ); > > use C4::Context; >+ >+=head2 effective_itemtype >+ >+Returns item's effective itemtype >+ >+=cut >+ > sub effective_itemtype { > my ( $self ) = @_; > >@@ -772,4 +779,24 @@ sub effective_itemtype { > } > } > >+=head2 koha_objects_class >+ >+Returns related Koha::Objects class name >+ >+=cut >+ >+sub koha_objects_class { >+ 'Koha::Items'; >+} >+ >+=head2 koha_object_class >+ >+Returns related Koha::Object class name >+ >+=cut >+ >+sub koha_object_class { >+ 'Koha::Item'; >+} >+ > 1; >diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm >index de9fc6cb27..42d98fcb43 100644 >--- a/Koha/Schema/Result/OldReserve.pm >+++ b/Koha/Schema/Result/OldReserve.pm >@@ -300,9 +300,88 @@ __PACKAGE__->belongs_to( > # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZgGAW7ODBby3hGNJ41eeMA > >+=head2 item >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Item> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "item", >+ "Koha::Schema::Result::Item", >+ { itemnumber => "itemnumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 branch >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "branch", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 biblio >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Biblio> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "biblio", >+ "Koha::Schema::Result::Biblio", >+ { biblionumber => "biblionumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+__PACKAGE__->add_columns( >+ '+item_level_hold' => { is_boolean => 1 }, >+ '+lowestPriority' => { is_boolean => 1 }, >+ '+suspend' => { is_boolean => 1 } >+); >+ >+=head2 koha_object_class >+ >+Returns related Koha::Object class name >+ >+=cut >+ > sub koha_object_class { > 'Koha::Old::Hold'; > } >+ >+=head2 koha_objects_class >+ >+Returns related Koha::Objects class name >+ >+=cut >+ > sub koha_objects_class { > 'Koha::Old::Holds'; > } >-- >2.25.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 20936
:
98629
|
98630
|
100115
|
100116
|
100117
|
100205
|
100206
|
100207
|
100471
|
100472
|
100473
|
100474
|
101724
|
101725
|
101726
|
101727
|
101772
|
101915
|
102166
|
103948
|
103949
|
103950
|
103951
|
104040
|
104041
|
104466
|
104467
|
105131
|
112667
|
112668
|
112730
|
112731
|
112732
|
112733
|
113446
|
113447
|
113448
|
113449