Bugzilla – Attachment 169292 Details for
Bug 18086
overduerules table is lacking foreign key constraints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18086: Fix the behaviour of GetOverdueMessageTransportTypes
Bug-18086-Fix-the-behaviour-of-GetOverdueMessageTr.patch (text/plain), 1.70 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-07-22 14:04:04 UTC
(
hide
)
Description:
Bug 18086: Fix the behaviour of GetOverdueMessageTransportTypes
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2024-07-22 14:04:04 UTC
Size:
1.70 KB
patch
obsolete
>From 447337df0bafdfd57291442a4a2f6f201165c576 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <bski@laposte.net> >Date: Wed, 10 Jul 2024 17:19:14 +0200 >Subject: [PATCH] Bug 18086: Fix the behaviour of > GetOverdueMessageTransportTypes > >See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18086#c27 >for more context : >This addresses the second point of this comment. > >Test concerning GetOverdueMessageTransportTypes were not passing anymore after previous patch. > >This was due to the behaviour of Koha::Overdue->get_message_types which >returns all messages from a rule id, not taking into account the >letternumber when considering a OverdueRule (which is totally normal). >I fixed the join in GetOverdueMessageTransportTypes to return directly the desired column and use it in the >rest of the code > >Note: Koha::Overdue->get_message_types might not be necessary anymore >--- > C4/Overdues.pm | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 115df38..013a8ea 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -779,15 +779,16 @@ sub GetOverdueMessageTransportTypes { > }, > { > join => 'overduerules_transport_types', >+ '+select' => ['overduerules_transport_types.message_transport_type'], >+ '+as' => ['message_transport_type'], > } >- )->next; >+ ); > > return [] unless $rule; > >- my $transport_types = $rule->transport_types; > my @mtts; >- while ( my $mtt = $transport_types->next ) { >- push @mtts, $mtt->message_transport_type; >+ while ( my $mtt = $rule->next ) { >+ push @mtts, $mtt->get_column('message_transport_type'); > } > > # Put 'print' in first if exists >-- >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 18086
:
105368
|
105369
|
105380
|
105382
|
105387
|
105388
|
105424
|
105551
|
106201
|
134730
|
134731
|
168810
|
168811
|
168812
|
168813
|
168814
|
168815
|
169287
|
169288
|
169289
|
169290
|
169291
|
169292
|
169293
|
169294
|
169295
|
169296
|
169297
|
169298
|
169299
|
169300
|
169301
|
169302
|
169396
|
169397
|
169398
|
169399
|
169400
|
169401
|
169402
|
169403
|
169404
|
169455
|
169456
|
169457
|
169458
|
169459
|
169460
|
169461
|
169462
|
169463
|
169543
|
169544