Bug 23679 - Software error when trying to transfer an unknown barcode
Summary: Software error when trying to transfer an unknown barcode
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-26 07:08 UTC by Fridolin SOMERS
Modified: 2019-11-13 22:39 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.05


Attachments
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t (1.88 KB, patch)
2019-09-26 07:14 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 23679: fix software error when trying to transfer an unknown barcode (1.23 KB, patch)
2019-09-26 07:15 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t (1.94 KB, patch)
2019-09-27 12:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23679: fix software error when trying to transfer an unknown barcode (1.29 KB, patch)
2019-09-27 12:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t (1.93 KB, patch)
2019-09-27 19:27 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 23679: fix software error when trying to transfer an unknown barcode (1.28 KB, patch)
2019-09-27 19:35 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 23679: fix software error when trying to transfer an unknown barcode (1.33 KB, patch)
2019-09-27 19:50 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t (1.97 KB, patch)
2019-09-27 19:50 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 23679: fix software error when trying to transfer an unknown barcode (1.38 KB, patch)
2019-09-30 11:51 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t (2.03 KB, patch)
2019-09-30 11:51 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 Fridolin SOMERS 2019-09-26 07:08:07 UTC
When trying to transfer an unknown barcode in /cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at /home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when finding unknown barcode.
Comment 1 Fridolin SOMERS 2019-09-26 07:14:52 UTC Comment hidden (obsolete)
Comment 2 Fridolin SOMERS 2019-09-26 07:15:09 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2019-09-27 12:04:57 UTC
Created attachment 93198 [details] [review]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2019-09-27 12:05:00 UTC
Created attachment 93199 [details] [review]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Bin Wen 2019-09-27 19:27:49 UTC
Created attachment 93211 [details] [review]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Bin Wen 2019-09-27 19:35:51 UTC
Created attachment 93212 [details] [review]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Bin Wen 2019-09-27 19:50:07 UTC
Created attachment 93213 [details] [review]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Comment 8 Bin Wen 2019-09-27 19:50:13 UTC
Created attachment 93214 [details] [review]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Comment 9 Nick Clemens 2019-09-30 11:51:15 UTC
Created attachment 93235 [details] [review]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Nick Clemens 2019-09-30 11:51:23 UTC
Created attachment 93236 [details] [review]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Martin Renvoize 2019-10-01 06:45:57 UTC
Nice work!

Pushed to master for 19.11.00
Comment 12 Fridolin SOMERS 2019-10-08 07:46:52 UTC
+my $badbc = 'wherethehelldoyoucomefrom';
Did you see this egg XD
Comment 13 Fridolin SOMERS 2019-10-08 07:47:17 UTC
Pushed to 19.05.x for 19.05.05
Comment 14 Lucas Gass 2019-11-13 22:38:16 UTC
backported to 18.11.x for 18.11.11