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

(-)a/Koha/Item.pm (-3 / +4 lines)
Lines 2783-2789 FIXME: It should return I<$self>. See bug 35270. Link Here
2783
sub location_update_trigger {
2783
sub location_update_trigger {
2784
    my ( $self, $action ) = @_;
2784
    my ( $self, $action ) = @_;
2785
2785
2786
    if (my $new_location = $self->_check_location_update_rules($action)) {
2786
    my $new_location = $self->_check_location_update_rules($action);
2787
    if (defined $new_location) {
2787
        my $messages = {
2788
        my $messages = {
2788
            'ItemLocationUpdated' => {
2789
            'ItemLocationUpdated' => {
2789
                from => $self->location,
2790
                from => $self->location,
Lines 2815-2822 sub _check_location_update_rules { Link Here
2815
        if (defined($update_loc_rules->{'_ALL_'})) {
2816
        if (defined($update_loc_rules->{'_ALL_'})) {
2816
            return $self->_check_location_update_rule($update_loc_rules->{'_ALL_'});
2817
            return $self->_check_location_update_rule($update_loc_rules->{'_ALL_'});
2817
        }
2818
        }
2818
        elsif (defined($update_loc_rules->{$self->location//''})) {
2819
        elsif (defined($update_loc_rules->{$self->location||'_BLANK_'})) {
2819
            return $self->_check_location_update_rule($update_loc_rules->{$self->location});
2820
            return $self->_check_location_update_rule($update_loc_rules->{$self->location||'_BLANK_'});
2820
        }
2821
        }
2821
        elsif (defined($update_loc_rules->{'_DEFAULT_'})) {
2822
        elsif (defined($update_loc_rules->{'_DEFAULT_'})) {
2822
            return $self->_check_location_update_rule($update_loc_rules->{'_DEFAULT_'});
2823
            return $self->_check_location_update_rule($update_loc_rules->{'_DEFAULT_'});
(-)a/t/db_dependent/Koha/Item.t (-3 / +2 lines)
Lines 45-51 use t::lib::Dates; Link Here
45
45
46
my $schema  = Koha::Database->new->schema;
46
my $schema  = Koha::Database->new->schema;
47
my $builder = t::lib::TestBuilder->new;
47
my $builder = t::lib::TestBuilder->new;
48
48
=head3
49
subtest '_status() tests' => sub {
49
subtest '_status() tests' => sub {
50
50
51
    plan tests => 15;
51
    plan tests => 15;
Lines 3353-3359 subtest 'current_branchtransfers relationship' => sub { Link Here
3353
3353
3354
    $schema->storage->txn_rollback;
3354
    $schema->storage->txn_rollback;
3355
};
3355
};
3356
3356
=cut
3357
subtest 'location_update_trigger() tests' => sub {
3357
subtest 'location_update_trigger() tests' => sub {
3358
3358
3359
    plan tests => 12;
3359
    plan tests => 12;
3360
- 

Return to bug 29326