Bugzilla – Attachment 193736 Details for
Bug 14962
Temp Shelving Location / On Display Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14962: DBIC - DO NOT PUSH
06f2da7.patch (text/plain), 15.52 KB, created by
Martin Renvoize (ashimema)
on 2026-02-24 13:36:19 UTC
(
hide
)
Description:
Bug 14962: DBIC - DO NOT PUSH
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-02-24 13:36:19 UTC
Size:
15.52 KB
patch
obsolete
>From 06f2da71ebec25fd45242171ba25932dcf83685a Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >Date: Fri, 23 Jan 2026 09:09:30 +0000 >Subject: [PATCH] Bug 14962: DBIC - DO NOT PUSH > >Sponsored-by: ByWater Solutions >Signed-of-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > Koha/Schema/Result/Biblio.pm | 19 +- > Koha/Schema/Result/Branch.pm | 34 +++- > Koha/Schema/Result/Display.pm | 274 +++++++++++++++++++++++++++++ > Koha/Schema/Result/DisplayItem.pm | 182 +++++++++++++++++++ > Koha/Schema/Result/Item.pm | 19 +- > Koha/Schema/Result/Itemtype.pm | 19 +- > Koha/Schema/Result/LibraryGroup.pm | 14 +- > 7 files changed, 551 insertions(+), 10 deletions(-) > create mode 100644 Koha/Schema/Result/Display.pm > create mode 100644 Koha/Schema/Result/DisplayItem.pm > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 7d2ce13fa0e..183c78e2f49 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -325,6 +325,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 display_items >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::DisplayItem> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "display_items", >+ "Koha::Schema::Result::DisplayItem", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 erm_eholdings_titles > > Type: has_many >@@ -641,8 +656,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-12-18 12:10:28 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QXaEHXqH2ApC+F22zo7gXA >+# Created by DBIx::Class::Schema::Loader v0.07052 @ 2026-01-23 09:09:14 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KGPqlfnbYwCoumFBRE/Ahw > > __PACKAGE__->has_many( > "biblioitem", >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 0ac29d99ab7..2471807f43e 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -680,6 +680,36 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 displays_display_branches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Display> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "displays_display_branches", >+ "Koha::Schema::Result::Display", >+ { "foreign.display_branch" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 displays_display_holding_branches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Display> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "displays_display_holding_branches", >+ "Koha::Schema::Result::Display", >+ { "foreign.display_holding_branch" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 edifact_eans > > Type: has_many >@@ -1011,8 +1041,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-10 17:39:28 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qVz4KJbAEtT4XDNdAxWc7w >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-12 15:44:57 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kr3exHW4M4+yNwCvIgHCbg > > __PACKAGE__->has_many( > "additional_field_values", >diff --git a/Koha/Schema/Result/Display.pm b/Koha/Schema/Result/Display.pm >new file mode 100644 >index 00000000000..c81b16eff56 >--- /dev/null >+++ b/Koha/Schema/Result/Display.pm >@@ -0,0 +1,274 @@ >+use utf8; >+package Koha::Schema::Result::Display; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::Display >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<displays> >+ >+=cut >+ >+__PACKAGE__->table("displays"); >+ >+=head1 ACCESSORS >+ >+=head2 display_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+unique id for the display >+ >+=head2 display_name >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+the name of the display >+ >+=head2 start_date >+ >+ data_type: 'date' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+the start date of the display (optional) >+ >+=head2 end_date >+ >+ data_type: 'date' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+the end date of the display (optional) >+ >+=head2 enabled >+ >+ data_type: 'tinyint' >+ default_value: 1 >+ is_nullable: 0 >+ >+determines whether the display is active >+ >+=head2 display_location >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 80 >+ >+the shelving location for the display (optional) >+ >+=head2 display_code >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 80 >+ >+the collection code for the display (optional) >+ >+=head2 display_branch >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+a new home branch for the item to have while on display (optional) >+ >+=head2 display_holding_branch >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+a new holding branch for the item to have while on display (optional) >+ >+=head2 display_itype >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+a new itype for the item to have while on display (optional) >+ >+=head2 staff_note >+ >+ data_type: 'mediumtext' >+ is_nullable: 1 >+ >+staff note for the display >+ >+=head2 public_note >+ >+ data_type: 'mediumtext' >+ is_nullable: 1 >+ >+public note for the display >+ >+=head2 display_days >+ >+ data_type: 'integer' >+ is_nullable: 1 >+ >+default number of days items will remain on display >+ >+=head2 display_return_over >+ >+ data_type: 'enum' >+ default_value: 'no' >+ extra: {list => ["yes - any library","yes - except at home library","no"]} >+ is_nullable: 0 >+ >+should the item be removed from the display when it is returned >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "display_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "display_name", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "start_date", >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >+ "end_date", >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >+ "enabled", >+ { data_type => "tinyint", default_value => 1, is_nullable => 0 }, >+ "display_location", >+ { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "display_code", >+ { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "display_branch", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "display_holding_branch", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "display_itype", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "staff_note", >+ { data_type => "mediumtext", is_nullable => 1 }, >+ "public_note", >+ { data_type => "mediumtext", is_nullable => 1 }, >+ "display_days", >+ { data_type => "integer", is_nullable => 1 }, >+ "display_return_over", >+ { >+ data_type => "enum", >+ default_value => "no", >+ extra => { >+ list => ["yes - any library", "yes - except at home library", "no"], >+ }, >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</display_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("display_id"); >+ >+=head1 RELATIONS >+ >+=head2 display_branch >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "display_branch", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "display_branch" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 display_holding_branch >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "display_holding_branch", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "display_holding_branch" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 display_items >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::DisplayItem> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "display_items", >+ "Koha::Schema::Result::DisplayItem", >+ { "foreign.display_id" => "self.display_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 display_itype >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Itemtype> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "display_itype", >+ "Koha::Schema::Result::Itemtype", >+ { itemtype => "display_itype" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07052 @ 2026-01-23 09:09:14 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H9lmIkwezw9ZF8DBN683ag >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/DisplayItem.pm b/Koha/Schema/Result/DisplayItem.pm >new file mode 100644 >index 00000000000..383aa6069c6 >--- /dev/null >+++ b/Koha/Schema/Result/DisplayItem.pm >@@ -0,0 +1,182 @@ >+use utf8; >+package Koha::Schema::Result::DisplayItem; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::DisplayItem >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<display_items> >+ >+=cut >+ >+__PACKAGE__->table("display_items"); >+ >+=head1 ACCESSORS >+ >+=head2 display_item_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+primary key >+ >+=head2 display_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+foreign key to link to displays.display_id >+ >+=head2 itemnumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+items.itemnumber for the item on display >+ >+=head2 biblionumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+biblio.biblionumber for the bibliographic record on display >+ >+=head2 date_added >+ >+ data_type: 'date' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+the date the item was added to the display >+ >+=head2 date_remove >+ >+ data_type: 'date' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+the date the item should be removed from the display >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "display_item_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "display_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "itemnumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "biblionumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "date_added", >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >+ "date_remove", >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</display_item_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("display_item_id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<display_items_uniq> >+ >+=over 4 >+ >+=item * L</display_id> >+ >+=item * L</itemnumber> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("display_items_uniq", ["display_id", "itemnumber"]); >+ >+=head1 RELATIONS >+ >+=head2 biblionumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Biblio> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "biblionumber", >+ "Koha::Schema::Result::Biblio", >+ { biblionumber => "biblionumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 display >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Display> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "display", >+ "Koha::Schema::Result::Display", >+ { display_id => "display_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 itemnumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Item> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "itemnumber", >+ "Koha::Schema::Result::Item", >+ { itemnumber => "itemnumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07052 @ 2026-01-23 09:09:14 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UtJGB1faNtl32qkcx1029A >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 042afa0a441..6c4642c45f6 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -710,6 +710,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 display_items >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::DisplayItem> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "display_items", >+ "Koha::Schema::Result::DisplayItem", >+ { "foreign.itemnumber" => "self.itemnumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 hold_fill_target > > Type: might_have >@@ -991,8 +1006,8 @@ __PACKAGE__->might_have( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-01-22 21:05:23 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d/Q+Ym3pNstyDcgjVhLykQ >+# Created by DBIx::Class::Schema::Loader v0.07052 @ 2026-01-23 09:09:14 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C8eknPHReOQZ0wNorcH6Qw > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm >index 88c3e403caa..3ecd4e0b0da 100644 >--- a/Koha/Schema/Result/Itemtype.pm >+++ b/Koha/Schema/Result/Itemtype.pm >@@ -279,6 +279,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 displays >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Display> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "displays", >+ "Koha::Schema::Result::Display", >+ { "foreign.display_itype" => "self.itemtype" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 itemtypes > > Type: has_many >@@ -375,8 +390,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-10 17:39:28 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jdGLBem2+Cj1STCmWCf2Bg >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-12 15:44:57 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AP+XlPwTOT5j7U7C6Nu4rQ > > __PACKAGE__->add_columns( > '+automatic_checkin' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/LibraryGroup.pm b/Koha/Schema/Result/LibraryGroup.pm >index c1c25568095..f2d810b98ad 100644 >--- a/Koha/Schema/Result/LibraryGroup.pm >+++ b/Koha/Schema/Result/LibraryGroup.pm >@@ -111,6 +111,14 @@ Use this group to identify libraries as pick up location for holds > > Use this group to identify libraries as part of float group > >+=head2 ft_display_group >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+Use this group to identify libraries that can share display items >+ > =head2 created_on > > data_type: 'timestamp' >@@ -153,6 +161,8 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > "ft_local_float_group", > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "ft_display_group", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > "created_on", > { > data_type => "timestamp", >@@ -266,8 +276,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-04-28 16:41:47 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CkZe+3Qm2ZlmoSmXBGChag >+# Created by DBIx::Class::Schema::Loader v0.07052 @ 2026-01-23 09:09:14 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RfR5c1cwkECUu+K5cSzMGw > > =head2 koha_object_class > >-- >2.53.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 14962
:
190216
|
190217
|
190218
|
190219
|
190220
|
190221
|
190222
|
190223
|
190224
|
190225
|
190226
|
190227
|
190228
|
190229
|
190230
|
190231
|
190232
|
190571
|
190572
|
193719
|
193720
|
193721
|
193722
|
193723
|
193724
|
193725
|
193726
|
193727
|
193728
|
193729
|
193730
|
193731
|
193732
|
193733
|
193734
|
193735
|
193736
|
193737
|
193738
|
193739
|
193740
|
193741
|
193742
|
193743
|
193744
|
193745
|
193746
|
193747
|
193748
|
193749
|
193750
|
193751
|
193752
|
193753
|
193754
|
193755
|
194285
|
194286
|
194287
|
194288
|
194289
|
194290
|
194291
|
194292
|
194293
|
194294
|
194295
|
194296
|
194297
|
194298
|
194299
|
194300
|
194301
|
194302
|
194303
|
194304
|
194305
|
194306
|
194307
|
194308
|
194309
|
194310
|
194311
|
194312
|
194313
|
194314
|
194315
|
194316
|
194317
|
194318
|
194320
|
194321
|
194322