Bugzilla – Attachment 173672 Details for
Bug 34324
Merge OPACProblemReport and CatalogConcern functions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34324: Add relationship aliases
Bug-34324-Add-relationship-aliases.patch (text/plain), 1.72 KB, created by
Martin Renvoize (ashimema)
on 2024-10-29 15:46:20 UTC
(
hide
)
Description:
Bug 34324: Add relationship aliases
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-29 15:46:20 UTC
Size:
1.72 KB
patch
obsolete
>From af2073ca2548b5d4d98cffba5ddaef33b0de654d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 20 Dec 2023 17:29:30 +0000 >Subject: [PATCH] Bug 34324: Add relationship aliases > >--- > Koha/Schema/Result/Ticket.pm | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > >diff --git a/Koha/Schema/Result/Ticket.pm b/Koha/Schema/Result/Ticket.pm >index abc639a055c..82694bba6ec 100644 >--- a/Koha/Schema/Result/Ticket.pm >+++ b/Koha/Schema/Result/Ticket.pm >@@ -266,6 +266,37 @@ __PACKAGE__->has_many( > # Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-02 11:36:36 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8bWiSb7hXPFYRzRzrVG3kw > >+__PACKAGE__->has_many( >+ "additional_field_values", >+ "Koha::Schema::Result::AdditionalFieldValue", >+ sub { >+ my ($args) = @_; >+ >+ return { >+ "$args->{foreign_alias}.record_id" => { -ident => "$args->{self_alias}.id" }, >+ >+ "$args->{foreign_alias}.field_id" => >+ { -in => \'(SELECT id FROM additional_fields WHERE tablename="tickets")' }, >+ }; >+ }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+__PACKAGE__->has_many( >+ "extended_attributes", >+ "Koha::Schema::Result::AdditionalFieldValue", >+ sub { >+ my ($args) = @_; >+ >+ return { >+ "$args->{foreign_alias}.record_id" => { -ident => "$args->{self_alias}.id" }, >+ >+ "$args->{foreign_alias}.field_id" => >+ { -in => \'(SELECT id FROM additional_fields WHERE tablename="tickets")' }, >+ }; >+ }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); > > # You can replace this text with custom code or comments, and it will be preserved on regeneration > 1; >-- >2.47.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 34324
:
160199
|
160200
|
160201
|
160202
|
160203
|
160204
|
160205
|
160206
|
173580
|
173581
|
173582
|
173583
|
173584
|
173585
|
173586
|
173587
|
173671
| 173672 |
173673
|
173674
|
173675
|
173676
|
173677
|
173678
|
173679
|
173680