Bugzilla – Attachment 129021 Details for
Bug 28932
Backend overriding status_graph element causes duplicate actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28932: Fix duplicate next_action & prev_action
Bug-28932-Fix-duplicate-nextaction--prevaction.patch (text/plain), 1.76 KB, created by
Tomás Cohen Arazi
on 2022-01-05 13:09:04 UTC
(
hide
)
Description:
Bug 28932: Fix duplicate next_action & prev_action
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2022-01-05 13:09:04 UTC
Size:
1.76 KB
patch
obsolete
>From c7a82b2c8b4ec48f01f658281f123031ea923d80 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Wed, 5 Jan 2022 10:00:10 -0300 >Subject: [PATCH] Bug 28932: Fix duplicate next_action & prev_action > >This patch fixes the duplicate buttons issue. >To test: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/Illrequests.t >=> FAIL: Tests fail >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests pass > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Illrequest.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 7ea301fde3..6d26418cd9 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -569,7 +569,8 @@ sub _status_graph_union { > if ( grep { $prev_action eq $_ } @core_status_ids ) { > my @next_actions = > @{$status_graph->{$prev_action}->{next_actions}}; >- push @next_actions, $backend_status_key; >+ push @next_actions, $backend_status_key >+ if (!grep(/^$backend_status_key$/, @next_actions)); > $status_graph->{$prev_action}->{next_actions} > = \@next_actions; > } >@@ -579,7 +580,8 @@ sub _status_graph_union { > if ( grep { $next_action eq $_ } @core_status_ids ) { > my @prev_actions = > @{$status_graph->{$next_action}->{prev_actions}}; >- push @prev_actions, $backend_status_key; >+ push @prev_actions, $backend_status_key >+ if (!grep(/^$backend_status_key$/, @prev_actions)); > $status_graph->{$next_action}->{prev_actions} > = \@prev_actions; > } >-- >2.34.1
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 28932
:
124309
|
129020
| 129021