View | Details | Raw Unified | Return to bug 23463
Collapse All | Expand All

(-)a/Koha/Item.pm (-3 / +3 lines)
Lines 76-82 sub store { Link Here
76
        $self->itype($self->biblio->biblioitem->itemtype);
76
        $self->itype($self->biblio->biblioitem->itemtype);
77
    }
77
    }
78
78
79
    if ( $self->itemcallnumber ) { # This could be improved, we should recalculate it only if changed
79
    my %updated_columns = $self->_result->get_dirty_columns;
80
    if ( exists $updated_columns{itemcallnumber} ) {
80
        my $cn_sort = GetClassSort($self->cn_source, $self->itemcallnumber, "");
81
        my $cn_sort = GetClassSort($self->cn_source, $self->itemcallnumber, "");
81
        $self->cn_sort($cn_sort);
82
        $self->cn_sort($cn_sort);
82
    }
83
    }
Lines 135-141 sub store { Link Here
135
            }
136
            }
136
        }
137
        }
137
138
138
        my %updated_columns = $self->_result->get_dirty_columns;
139
        %updated_columns = $self->_result->get_dirty_columns;
139
        return $self->SUPER::store unless %updated_columns;
140
        return $self->SUPER::store unless %updated_columns;
140
        if (    exists $updated_columns{location}
141
        if (    exists $updated_columns{location}
141
            and $self->location ne 'CART'
142
            and $self->location ne 'CART'
142
- 

Return to bug 23463