From 8a60dbce81c566d691e4b5a7d8ac257c6049dc49 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 2 Dec 2019 14:32:09 +0100 Subject: [PATCH] Bug 23463: cn_sort needs to be updated if cn_source changed --- Koha/Item.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 335a8ecf97..d9bfe0b557 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -77,8 +77,10 @@ sub store { } my %updated_columns = $self->_result->get_dirty_columns; - if ( exists $updated_columns{itemcallnumber} ) { - my $cn_sort = GetClassSort($self->cn_source, $self->itemcallnumber, ""); + if ( exists $updated_columns{itemcallnumber} + or exists $updated_columns{cn_source} ) + { + my $cn_sort = GetClassSort( $self->cn_source, $self->itemcallnumber, "" ); $self->cn_sort($cn_sort); } -- 2.25.0