Bugzilla – Attachment 151523 Details for
Bug 30719
ILL should provide the ability to create batch requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30719: dbic specific, DONT PUSH
Bug-30719-dbic-specific-DONT-PUSH.patch (text/plain), 9.76 KB, created by
Pedro Amorim
on 2023-05-22 13:10:06 UTC
(
hide
)
Description:
Bug 30719: dbic specific, DONT PUSH
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-05-22 13:10:06 UTC
Size:
9.76 KB
patch
obsolete
>From e18e2ffdbfe974fbd72855e96fbfcd4727bc0e9e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 12 May 2023 17:11:24 +0000 >Subject: [PATCH] Bug 30719: dbic specific, DONT PUSH > >--- > Koha/Schema/Result/Borrower.pm | 19 ++- > Koha/Schema/Result/Branch.pm | 19 ++- > Koha/Schema/Result/Illbatch.pm | 190 +++++++++++++++++++++++++++ > Koha/Schema/Result/IllbatchStatus.pm | 111 ++++++++++++++++ > Koha/Schema/Result/Illrequest.pm | 34 ++++- > 5 files changed, 367 insertions(+), 6 deletions(-) > create mode 100644 Koha/Schema/Result/Illbatch.pm > create mode 100644 Koha/Schema/Result/IllbatchStatus.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 5576e8fcd2..075cef0c7f 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1402,6 +1402,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 illbatches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Illbatch> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "illbatches", >+ "Koha::Schema::Result::Illbatch", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 illcomments > > Type: has_many >@@ -2103,8 +2118,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-06 15:46:57 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f6omVb7EtiysdaWTX3IRzg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-28 11:24:21 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RUWvcq9kgQvACo14H/u9jQ > > __PACKAGE__->has_many( > "restrictions", >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index c86ca6736f..7d0cbaffaf 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -692,6 +692,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 illbatches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Illbatch> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "illbatches", >+ "Koha::Schema::Result::Illbatch", >+ { "foreign.branchcode" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 illrequests > > Type: has_many >@@ -918,8 +933,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-08 17:35:26 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QPqXuEigMeIBb9NKMSkrNw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-28 11:24:21 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GGYhqyTVMmaFo9hAY4Jy5w > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/Illbatch.pm b/Koha/Schema/Result/Illbatch.pm >new file mode 100644 >index 0000000000..9090f9d870 >--- /dev/null >+++ b/Koha/Schema/Result/Illbatch.pm >@@ -0,0 +1,190 @@ >+use utf8; >+package Koha::Schema::Result::Illbatch; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::Illbatch >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<illbatches> >+ >+=cut >+ >+__PACKAGE__->table("illbatches"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 name >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 100 >+ >+=head2 backend >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 20 >+ >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+=head2 branchcode >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 50 >+ >+=head2 statuscode >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 20 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "name", >+ { data_type => "varchar", is_nullable => 0, size => 100 }, >+ "backend", >+ { data_type => "varchar", is_nullable => 0, size => 20 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "branchcode", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 50 }, >+ "statuscode", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 20 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<u_illbatches__name> >+ >+=over 4 >+ >+=item * L</name> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("u_illbatches__name", ["name"]); >+ >+=head1 RELATIONS >+ >+=head2 borrowernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrowernumber", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrowernumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 branchcode >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "branchcode", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 illrequests >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Illrequest> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "illrequests", >+ "Koha::Schema::Result::Illrequest", >+ { "foreign.batch_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 statuscode >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::IllbatchStatus> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "statuscode", >+ "Koha::Schema::Result::IllbatchStatus", >+ { code => "statuscode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-28 11:24:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j4UhTuwaQnwWhjSd9j35tg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/IllbatchStatus.pm b/Koha/Schema/Result/IllbatchStatus.pm >new file mode 100644 >index 0000000000..8f86ea430b >--- /dev/null >+++ b/Koha/Schema/Result/IllbatchStatus.pm >@@ -0,0 +1,111 @@ >+use utf8; >+package Koha::Schema::Result::IllbatchStatus; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::IllbatchStatus >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<illbatch_statuses> >+ >+=cut >+ >+__PACKAGE__->table("illbatch_statuses"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 name >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 100 >+ >+=head2 code >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 20 >+ >+=head2 is_system >+ >+ data_type: 'integer' >+ is_nullable: 1 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "name", >+ { data_type => "varchar", is_nullable => 0, size => 100 }, >+ "code", >+ { data_type => "varchar", is_nullable => 0, size => 20 }, >+ "is_system", >+ { data_type => "integer", is_nullable => 1 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<u_illbatchstatuses__code> >+ >+=over 4 >+ >+=item * L</code> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("u_illbatchstatuses__code", ["code"]); >+ >+=head1 RELATIONS >+ >+=head2 illbatches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Illbatch> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "illbatches", >+ "Koha::Schema::Result::Illbatch", >+ { "foreign.statuscode" => "self.code" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-28 11:24:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LUHcLxj5W4tParGOEkVCdg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/Illrequest.pm b/Koha/Schema/Result/Illrequest.pm >index 3c55a2a357..ff971e8b05 100644 >--- a/Koha/Schema/Result/Illrequest.pm >+++ b/Koha/Schema/Result/Illrequest.pm >@@ -175,6 +175,14 @@ Backend id attached to request > > The backend used to create request > >+=head2 batch_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+Optional ID of batch that this request belongs to >+ > =cut > > __PACKAGE__->add_columns( >@@ -230,6 +238,8 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 50 }, > "backend", > { data_type => "varchar", is_nullable => 1, size => 20 }, >+ "batch_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -246,6 +256,26 @@ __PACKAGE__->set_primary_key("illrequest_id"); > > =head1 RELATIONS > >+=head2 batch >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Illbatch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "batch", >+ "Koha::Schema::Result::Illbatch", >+ { id => "batch_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 biblio > > Type: belongs_to >@@ -352,8 +382,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-05-05 12:10:10 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1VhNc8tMnvCpBYaj90YOiQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-28 11:24:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:i7xURQ9tMmQfW7wg1lAaEA > > __PACKAGE__->has_many( > "comments", >-- >2.30.2
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 30719
:
144281
|
144285
|
144286
|
144287
|
144288
|
144289
|
144290
|
144291
|
144292
|
144293
|
144294
|
144295
|
144296
|
144297
|
144298
|
144299
|
144300
|
144301
|
144302
|
145760
|
145869
|
145870
|
145876
|
145934
|
146152
|
147658
|
147929
|
147930
|
147931
|
147932
|
147933
|
147934
|
147952
|
147953
|
147954
|
147955
|
147956
|
151152
|
151153
|
151154
|
151155
|
151156
|
151284
|
151285
|
151286
|
151287
|
151288
|
151303
|
151304
|
151305
|
151306
|
151307
|
151308
|
151309
|
151310
|
151311
|
151312
|
151513
|
151514
|
151515
|
151516
|
151517
|
151519
|
151520
|
151521
|
151522
|
151523
|
151571
|
151572
|
151573
|
151574
|
151575
|
151611
|
151612
|
151613
|
151614
|
151615
|
151804
|
151805
|
151806
|
151807
|
151808
|
151809
|
154046
|
154047
|
154048
|
154049
|
154050
|
154051
|
154052
|
155421
|
155422
|
155423
|
155424
|
155425
|
155426
|
155427
|
155428
|
155429
|
155430
|
155431
|
155432
|
155433
|
155434
|
155435
|
156556
|
156748
|
156749
|
156752
|
156783
|
156785
|
156811
|
156812
|
156827
|
156828