Bug 29202 - replacementprice changes should trigger replacementpricedate updates
Summary: replacementprice changes should trigger replacementpricedate updates
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 29177
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-11 09:31 UTC by Martin Renvoize
Modified: 2022-06-06 20:25 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29202: Trigger replacementpricedate on replacementprice change (2.09 KB, patch)
2021-10-11 09:39 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-10-11 09:31:53 UTC
Currently, we aren't entirely consistent with setting the replacementpricedate field whenever replacementprice is updated.. we should add it to the list of fields handled in the Koha::Item store triggers.
Comment 1 Martin Renvoize 2021-10-11 09:39:54 UTC
Created attachment 126037 [details] [review]
Bug 29202: Trigger replacementpricedate on replacementprice change
Comment 2 Marcel de Rooy 2021-10-11 12:55:24 UTC
        my @fields = qw( itemlost withdrawn damaged replacementprice );
        for my $field (@fields) {

[...]
                my $field_on = "${field}_on";
                $self->$field_on(undef);

This will not work for replacementprice ;)
No _on there

Btw I have my doubts here if the code does exactly what we want here. We only want a updated timestamp if the value actually changes.

Is the finishreceive script the only passing this value?

We need some tests !
Comment 3 Martin Renvoize 2021-10-22 15:36:25 UTC
I've decided this is invalid.. :-)