Bugzilla – Attachment 110698 Details for
Bug 26510
Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26510: Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled
Bug-26510-Transport-Cost-Matrix-editor-doesnt-show.patch (text/plain), 2.67 KB, created by
Katrin Fischer
on 2020-09-24 18:59:41 UTC
(
hide
)
Description:
Bug 26510: Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-24 18:59:41 UTC
Size:
2.67 KB
patch
obsolete
>From 631fccdd6f1ad46a53aa8920db7f3c8c823b6796 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 22 Sep 2020 14:10:10 -0400 >Subject: [PATCH] Bug 26510: Transport Cost Matrix editor doesn't show all data > when HoldsQueueSkipClosed is enabled > >If HoldsQueueSkipClosed is enabled, and a library happens to be closed >on the day you edit the transport cost matrix, all the values for that >library will not show. Instead they will appear disabled, and if you >were to edit the cell and save a new value in it, it will also >'disappear' when the page is reloaded. > >Test Plan: >1) Set today as a holiday for a library >2) Set HoldsQueueSkipClosed to 'open' >3) Go to the transport cost matrix editor >4) Edit a cell where the 'from' is for the closed library >5) Note the value doesn't 'save', it is still in the database though >6) Apply this patch >7) Restart all the things! >8) Reload the transport cost matrix editor >9) The value now appears correctly! > >Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/HoldsQueue.pm | 5 ++++- > admin/transport-cost-matrix.pl | 2 +- > 2 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index b891afc437..14b5dc15ce 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -61,6 +61,9 @@ Returns Transport Cost Matrix as a hashref <to branch code> => <from branch code > =cut > > sub TransportCostMatrix { >+ my ( $params ) = @_; >+ my $ignore_holds_queue_skip_closed = $params->{ignore_holds_queue_skip_closed}; >+ > my $dbh = C4::Context->dbh; > my $transport_costs = $dbh->selectall_arrayref("SELECT * FROM transport_cost",{ Slice => {} }); > >@@ -77,7 +80,7 @@ sub TransportCostMatrix { > disable_transfer => $disabled > }; > >- if ( C4::Context->preference("HoldsQueueSkipClosed") ) { >+ if ( !$ignore_holds_queue_skip_closed && C4::Context->preference("HoldsQueueSkipClosed") ) { > $calendars->{$from} ||= Koha::Calendar->new( branchcode => $from ); > $transport_cost_matrix{$to}{$from}{disable_transfer} ||= > $calendars->{$from}->is_holiday( $today ); >diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl >index 9ef26c72b1..c146da975c 100755 >--- a/admin/transport-cost-matrix.pl >+++ b/admin/transport-cost-matrix.pl >@@ -45,7 +45,7 @@ my $update = ( $input->param('op') // '' ) eq 'set-cost-matrix'; > > my ($cost_matrix, $have_matrix); > unless ($update) { >- $cost_matrix = TransportCostMatrix(); >+ $cost_matrix = TransportCostMatrix({ ignore_holds_queue_skip_closed => 1 }); > $have_matrix = keys %$cost_matrix if $cost_matrix; > } > >-- >2.11.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 26510
:
110566
|
110672
| 110698