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

(-)a/Koha/Item.pm (-7 / +9 lines)
Lines 88-94 sub store { Link Here
88
        $self->itype($self->biblio->biblioitem->itemtype);
88
        $self->itype($self->biblio->biblioitem->itemtype);
89
    }
89
    }
90
90
91
    my $today = dt_from_string;
91
    my $today         = dt_from_string;
92
    my $plugin_action = 'create';
93
92
    unless ( $self->in_storage ) { #AddItem
94
    unless ( $self->in_storage ) { #AddItem
93
        unless ( $self->permanent_location ) {
95
        unless ( $self->permanent_location ) {
94
            $self->permanent_location($self->location);
96
            $self->permanent_location($self->location);
Lines 117-126 sub store { Link Here
117
        logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" )
119
        logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" )
118
          if $log_action && C4::Context->preference("CataloguingLog");
120
          if $log_action && C4::Context->preference("CataloguingLog");
119
121
120
        $self->_after_item_action_hooks({ action => 'create' });
121
122
    } else { # ModItem
122
    } else { # ModItem
123
123
124
        $plugin_action = 'modify';
125
124
        my %updated_columns = $self->_result->get_dirty_columns;
126
        my %updated_columns = $self->_result->get_dirty_columns;
125
        return $self->SUPER::store unless %updated_columns;
127
        return $self->SUPER::store unless %updated_columns;
126
128
Lines 190-197 sub store { Link Here
190
        C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" )
192
        C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" )
191
            unless $params->{skip_modzebra_update};
193
            unless $params->{skip_modzebra_update};
192
194
193
        $self->_after_item_action_hooks({ action => 'modify' });
194
195
        logaction( "CATALOGUING", "MODIFY", $self->itemnumber, "item " . Dumper($self->unblessed) )
195
        logaction( "CATALOGUING", "MODIFY", $self->itemnumber, "item " . Dumper($self->unblessed) )
196
          if $log_action && C4::Context->preference("CataloguingLog");
196
          if $log_action && C4::Context->preference("CataloguingLog");
197
    }
197
    }
Lines 200-206 sub store { Link Here
200
        $self->dateaccessioned($today);
200
        $self->dateaccessioned($today);
201
    }
201
    }
202
202
203
    return $self->SUPER::store;
203
    my $result = $self->SUPER::store;
204
    $self->get_from_storage->_after_item_action_hooks({ action => $plugin_action });
205
206
    return $result;
204
}
207
}
205
208
206
=head3 delete
209
=head3 delete
207
- 

Return to bug 26470