Bug 38303 - Item's replacement price not set to defaultreplacecost if 0.00
Summary: Item's replacement price not set to defaultreplacecost if 0.00
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Aleisha Amohia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-30 15:36 UTC by Jonathan Druart
Modified: 2024-11-01 08:14 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:
24.11.00
Circulation function:


Attachments
Bug 38303: Set item's replacement price to defaultreplacecost if 0.00 (1.62 KB, patch)
2024-10-30 15:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38303: Set item's replacement price to defaultreplacecost if 0.00 (1.67 KB, patch)
2024-10-30 17:03 UTC, David Nind
Details | Diff | Splinter Review
Bug 38303: Set item's replacement price to defaultreplacecost if 0.00 (1.73 KB, patch)
2024-10-31 04:57 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-10-30 15:36:54 UTC
Caught by a failing test

t/db_dependent/Circulation/CalcFine.t .. 1/7 
    #   Failed test 'Amount is calculated correctly'
    #   at t/db_dependent/Circulation/CalcFine.t line 271.
    #          got: '0'
    #     expected: '6'
    # Looks like you failed 1 test of 2.

introduced by bug 37943
Comment 1 Jonathan Druart 2024-10-30 15:39:00 UTC
Created attachment 173722 [details] [review]
Bug 38303: Set item's replacement price to defaultreplacecost if 0.00

No idea if this is a real bug. This code is fixing the following test
failure:
t/db_dependent/Circulation/CalcFine.t .. 1/7
    #   Failed test 'Amount is calculated correctly'
    #   at t/db_dependent/Circulation/CalcFine.t line 271.
    #          got: '0'
    #     expected: '6'
    # Looks like you failed 1 test of 2.
Comment 2 David Nind 2024-10-30 17:03:27 UTC
Created attachment 173730 [details] [review]
Bug 38303: Set item's replacement price to defaultreplacecost if 0.00

No idea if this is a real bug. This code is fixing the following test
failure:
t/db_dependent/Circulation/CalcFine.t .. 1/7
    #   Failed test 'Amount is calculated correctly'
    #   at t/db_dependent/Circulation/CalcFine.t line 271.
    #          got: '0'
    #     expected: '6'
    # Looks like you failed 1 test of 2.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Tomás Cohen Arazi (tcohen) 2024-10-30 19:11:38 UTC
Not sure how, but bisecting pointed to bug 37943.
Comment 4 Jonathan Druart 2024-10-30 19:50:30 UTC
Yes, because of the discard_changes call.
Comment 5 Tomás Cohen Arazi (tcohen) 2024-10-30 22:49:43 UTC
(In reply to Jonathan Druart from comment #4)
> Yes, because of the discard_changes call.

Isn't this highlighting something else?
Comment 6 Aleisha Amohia 2024-10-31 04:57:42 UTC
Created attachment 173746 [details] [review]
Bug 38303: Set item's replacement price to defaultreplacecost if 0.00

No idea if this is a real bug. This code is fixing the following test
failure:
t/db_dependent/Circulation/CalcFine.t .. 1/7
    #   Failed test 'Amount is calculated correctly'
    #   at t/db_dependent/Circulation/CalcFine.t line 271.
    #          got: '0'
    #     expected: '6'
    # Looks like you failed 1 test of 2.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 7 Jonathan Druart 2024-10-31 08:27:14 UTC
(In reply to Tomás Cohen Arazi (tcohen) from comment #5)
> (In reply to Jonathan Druart from comment #4)
> > Yes, because of the discard_changes call.
> 
> Isn't this highlighting something else?

Maybe, but I didn't find anything bad. It highlighted this problem at least.
Comment 8 Katrin Fischer 2024-10-31 10:04:16 UTC
Pushed for 24.11!

Well done everyone, thank you!