Bug 20825 - Cannot checkout if item types at biblio level
Summary: Cannot checkout if item types at biblio level
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: HP Linux
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 19943
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-27 16:32 UTC by sergeinik
Modified: 2019-10-14 19:58 UTC (History)
9 users (show)

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


Attachments
Message in browser (95.17 KB, image/png)
2018-05-27 16:32 UTC, sergeinik
Details
barcode input (149.40 KB, image/png)
2018-05-27 16:35 UTC, sergeinik
Details
18.05.00.000 (47.45 KB, image/png)
2018-05-28 06:04 UTC, sergeinik
Details
item (192.26 KB, image/png)
2018-05-28 06:13 UTC, sergeinik
Details
item (49.35 KB, image/png)
2018-05-28 06:14 UTC, sergeinik
Details
Bug 20825: Add regression tests (2.22 KB, patch)
2018-05-28 14:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem (2.02 KB, patch)
2018-05-28 14:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20825: Add regression tests (2.27 KB, patch)
2018-05-28 15:17 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem (2.21 KB, patch)
2018-05-28 15:17 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20825: Add regression tests (2.32 KB, patch)
2018-05-28 20:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem (2.26 KB, patch)
2018-05-28 20:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20825: Add regression tests (2.32 KB, patch)
2018-05-28 20:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem (2.26 KB, patch)
2018-05-28 20:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20825: (QA follow-up) set biblioitemnumber with correct value (1.05 KB, patch)
2018-05-29 15:55 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description sergeinik 2018-05-27 16:32:13 UTC
Created attachment 75575 [details]
Message in browser

When I try to issue an instance and enter a barcode, the program displays the following message: Software error: The method is not covered by tests!
Comment 1 sergeinik 2018-05-27 16:35:37 UTC
Created attachment 75576 [details]
barcode input
Comment 2 Katrin Fischer 2018-05-28 05:57:44 UTC
Can you please check your item has a valid itemtype, homebranch and what is set in the not for loan status?

What is the exact version of Koha you are using?
Comment 3 sergeinik 2018-05-28 06:04:17 UTC
18.05.00.000
Comment 4 sergeinik 2018-05-28 06:04:59 UTC
Created attachment 75578 [details]
18.05.00.000
Comment 5 sergeinik 2018-05-28 06:08:06 UTC
This happened when the program was updated to the latest version.
Comment 6 Katrin Fischer 2018-05-28 06:08:46 UTC
Can you also share a screenshot of your item please?
Comment 7 sergeinik 2018-05-28 06:13:57 UTC
Created attachment 75579 [details]
item
Comment 8 sergeinik 2018-05-28 06:14:11 UTC
Created attachment 75580 [details]
item
Comment 9 sergeinik 2018-05-28 06:17:24 UTC
In version 17.11, the release works, but the return does not work, and in version 18.05 the output does not work, but the return works.
Comment 10 sergeinik 2018-05-28 06:19:35 UTC
And literally three days ago everything worked. But when the latest updates came one by one, everything broke.
Comment 11 Jonathan Druart 2018-05-28 13:56:14 UTC
Caused by
  commit 6183c0e6a910663fec02bdba66d05f173310f562
  Bug 19943: Koha::Biblio - Replace GetBiblioItemData with Koha::Biblio->biblioitem

It happens when item types are defined at biblio level.
Comment 12 Jonathan Druart 2018-05-28 14:29:42 UTC
Created attachment 75591 [details] [review]
Bug 20825: Add regression tests
Comment 13 Jonathan Druart 2018-05-28 14:29:47 UTC
Created attachment 75592 [details] [review]
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem

On bug 19943:
 -        elsif ($biblioitem->{'notforloan'} == 1){
 +        elsif ($biblioitem->notforloan == 1){

The biblioitems table does not contain a notforloan column, this comes
from the item type.

This bug only appears when item type is defined at biblio level
(item-level_itypes=0)

Test plan:
Set item-level_itypes = biblio
Check an item out

Without this patch it explodes with
"The method notforloan is not covered by tests!"
Comment 14 Tomás Cohen Arazi 2018-05-28 15:17:10 UTC
Created attachment 75595 [details] [review]
Bug 20825: Add regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Tomás Cohen Arazi 2018-05-28 15:17:15 UTC
Created attachment 75596 [details] [review]
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem

On bug 19943:
 -        elsif ($biblioitem->{'notforloan'} == 1){
 +        elsif ($biblioitem->notforloan == 1){

The biblioitems table does not contain a notforloan column, this comes
from the item type.

This bug only appears when item type is defined at biblio level
(item-level_itypes=0)

Test plan:
Set item-level_itypes = biblio
Check an item out

Without this patch it explodes with
"The method notforloan is not covered by tests!"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I reproduced the error condition and verified the tests failed without
this patch. After this patch is applied, tests pass and checkout
succeeds.
Comment 16 Katrin Fischer 2018-05-28 20:06:16 UTC
Created attachment 75605 [details] [review]
Bug 20825: Add regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2018-05-28 20:06:22 UTC
Created attachment 75606 [details] [review]
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem

On bug 19943:
 -        elsif ($biblioitem->{'notforloan'} == 1){
 +        elsif ($biblioitem->notforloan == 1){

The biblioitems table does not contain a notforloan column, this comes
from the item type.

This bug only appears when item type is defined at biblio level
(item-level_itypes=0)

Test plan:
Set item-level_itypes = biblio
Check an item out

Without this patch it explodes with
"The method notforloan is not covered by tests!"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I reproduced the error condition and verified the tests failed without
this patch. After this patch is applied, tests pass and checkout
succeeds.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2018-05-28 20:08:38 UTC
Created attachment 75607 [details] [review]
Bug 20825: Add regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2018-05-28 20:08:43 UTC
Created attachment 75608 [details] [review]
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem

On bug 19943:
 -        elsif ($biblioitem->{'notforloan'} == 1){
 +        elsif ($biblioitem->notforloan == 1){

The biblioitems table does not contain a notforloan column, this comes
from the item type.

This bug only appears when item type is defined at biblio level
(item-level_itypes=0)

Test plan:
Set item-level_itypes = biblio
Check an item out

Without this patch it explodes with
"The method notforloan is not covered by tests!"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I reproduced the error condition and verified the tests failed without
this patch. After this patch is applied, tests pass and checkout
succeeds.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 sergeinik 2018-05-29 05:29:40 UTC
Thanks, it works.
Comment 21 Nick Clemens 2018-05-29 14:36:41 UTC
Pushed to master for 18.11.

Awesome work all, thank you.
Comment 22 Nick Clemens 2018-05-29 15:55:59 UTC
Created attachment 75639 [details] [review]
Bug 20825: (QA follow-up) set biblioitemnumber with correct value

Both biblionumber and biblioitemnumber for item were set to
biblionumber, when they don't line up tests fail

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 23 Martin Renvoize 2018-06-05 09:36:40 UTC
This patch has been pushed to 18.05.x, will be in 18.05.01
Comment 24 Fridolin Somers 2018-06-06 09:58:43 UTC
Depends on Bug 19943 not in 17.11.x