Bugzilla – Attachment 160366 Details for
Bug 35657
Add ability to assign tickets to librarians for catalog concerns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35657: Schema
Bug-35657-Schema.patch (text/plain), 5.17 KB, created by
Martin Renvoize (ashimema)
on 2023-12-29 12:13:12 UTC
(
hide
)
Description:
Bug 35657: Schema
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-12-29 12:13:12 UTC
Size:
5.17 KB
patch
obsolete
>From c4d58113810b1ba5d522442c8f4ad5ced2e94c83 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 29 Dec 2023 11:05:42 +0000 >Subject: [PATCH] Bug 35657: Schema > >--- > Koha/Schema/Result/Borrower.pm | 34 ++++++++++++++++++++++++++++-- > Koha/Schema/Result/Ticket.pm | 34 ++++++++++++++++++++++++++++-- > Koha/Schema/Result/TicketUpdate.pm | 34 ++++++++++++++++++++++++++++-- > 3 files changed, 96 insertions(+), 6 deletions(-) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 3657c03c32c..1b1da2fdcc1 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -2002,6 +2002,36 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 ticket_updates_assignees >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::TicketUpdate> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "ticket_updates_assignees", >+ "Koha::Schema::Result::TicketUpdate", >+ { "foreign.assignee_id" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 tickets_assignees >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Ticket> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "tickets_assignees", >+ "Koha::Schema::Result::Ticket", >+ { "foreign.assignee_id" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 tickets_reporters > > Type: has_many >@@ -2158,8 +2188,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-11-03 14:18:06 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PcGXqEI1ULB+Uoclqfbxig >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-29 11:05:09 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U1id9VAmZO9i6P+D97N0yA > > __PACKAGE__->has_many( > "restrictions", >diff --git a/Koha/Schema/Result/Ticket.pm b/Koha/Schema/Result/Ticket.pm >index 5a0acf75826..f31acac3c57 100644 >--- a/Koha/Schema/Result/Ticket.pm >+++ b/Koha/Schema/Result/Ticket.pm >@@ -71,6 +71,14 @@ ticket details > > current status of the ticket > >+=head2 assignee_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+id of the user who this ticket is assigned to >+ > =head2 resolver_id > > data_type: 'integer' >@@ -120,6 +128,8 @@ __PACKAGE__->add_columns( > { data_type => "text", is_nullable => 0 }, > "status", > { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "assignee_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "resolver_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "resolved_date", >@@ -146,6 +156,26 @@ __PACKAGE__->set_primary_key("id"); > > =head1 RELATIONS > >+=head2 assignee >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "assignee", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "assignee_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 biblio > > Type: belongs_to >@@ -217,8 +247,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-22 14:51:40 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lcKWaA+k/0lw5/6JrFhB1A >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-29 11:05:09 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CluP2ZCuByEcC3E0tLoOkA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/TicketUpdate.pm b/Koha/Schema/Result/TicketUpdate.pm >index a27ec6e11a4..6ea1af050f3 100644 >--- a/Koha/Schema/Result/TicketUpdate.pm >+++ b/Koha/Schema/Result/TicketUpdate.pm >@@ -48,6 +48,14 @@ id of catalog ticket the update relates to > > id of the user who logged the update > >+=head2 assignee_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+id of the user who this ticket was assigned to at this update >+ > =head2 public > > data_type: 'tinyint' >@@ -94,6 +102,8 @@ __PACKAGE__->add_columns( > is_foreign_key => 1, > is_nullable => 0, > }, >+ "assignee_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "public", > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > "date", >@@ -123,6 +133,26 @@ __PACKAGE__->set_primary_key("id"); > > =head1 RELATIONS > >+=head2 assignee >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "assignee", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "assignee_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 ticket > > Type: belongs_to >@@ -154,8 +184,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-22 14:51:40 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5fRHoeJ8uIAnOmxll7BsnA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-29 11:05:09 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rhHYbmjhy+D3+h4nu3TuPw > > __PACKAGE__->add_columns( '+public' => { is_boolean => 1 }, ); > >-- >2.43.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 35657
:
160365
|
160366
|
160367
|
160368
|
160369
|
160372
|
160373
|
160374
|
160375
|
160376
|
160377
|
164923
|
164924
|
164925
|
164926
|
164927
|
164928
|
164932
|
164933
|
164934
|
164935
|
164974
|
164975
|
164976
|
164977
|
165666
|
165667
|
165668
|
165669
|
165670
|
165671
|
165672
|
165673
|
165674
|
165675
|
165676
|
165677
|
165678
|
165679
|
165786
|
165787
|
165788
|
165789
|
165790
|
165791
|
165792
|
165878
|
165879
|
165880
|
165881
|
165882
|
165883
|
165884
|
165885
|
165886
|
166067