Bug 19766

Summary: Preview routing slip is broken
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, nick
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19858
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19058    
Bug Blocks: 19761    
Attachments: Bug 19766: (bug 19058 follow-up) Fix Preview routing slip
Bug 19766: (bug 19058 follow-up) Fix Preview routing slip
Bug 19766: (bug 19058 follow-up) Fix Preview routing slip

Description Jonathan Druart 2017-12-06 19:28:50 UTC
The method reserve_id is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 859.
The method set is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 871.
Can't call method "store" on an undefined value at /home/vagrant/kohaclone/C4/Reserves.pm line 871.


This is caused by
  commit ba1f2f93ef58c8dd935add3e215facdd4a589d12
    Bug 19058: Move C4::Reserves::GetReserveId to the Koha namespace
Comment 1 Jonathan Druart 2017-12-06 19:35:34 UTC
Created attachment 69591 [details] [review]
Bug 19766: (bug 19058 follow-up) Fix Preview routing slip

This patch fixes the following errors:
The method reserve_id is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 859.
The method set is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 871.
Can't call method "store" on an undefined value at /home/vagrant/kohaclone/C4/Reserves.pm line 871.

This is caused by
  commit ba1f2f93ef58c8dd935add3e215facdd4a589d12
    Bug 19058: Move C4::Reserves::GetReserveId to the Koha namespace

We are calling ->reserve_id on a Koha::Holds set.

Test plan:
- Serials -> Find subscription -> "Edit routing list" in the sidebar
- Add 1+ recipients
- Save -> "Save and preview routing slip"
Comment 2 Owen Leonard 2017-12-06 19:40:11 UTC
Created attachment 69592 [details] [review]
Bug 19766: (bug 19058 follow-up) Fix Preview routing slip

This patch fixes the following errors:
The method reserve_id is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 859.
The method set is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 871.
Can't call method "store" on an undefined value at /home/vagrant/kohaclone/C4/Reserves.pm line 871.

This is caused by
  commit ba1f2f93ef58c8dd935add3e215facdd4a589d12
    Bug 19058: Move C4::Reserves::GetReserveId to the Koha namespace

We are calling ->reserve_id on a Koha::Holds set.

Test plan:
- Serials -> Find subscription -> "Edit routing list" in the sidebar
- Add 1+ recipients
- Save -> "Save and preview routing slip"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Josef Moravec 2017-12-07 07:17:19 UTC
Created attachment 69593 [details] [review]
Bug 19766: (bug 19058 follow-up) Fix Preview routing slip

This patch fixes the following errors:
The method reserve_id is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 859.
The method set is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 871.
Can't call method "store" on an undefined value at /home/vagrant/kohaclone/C4/Reserves.pm line 871.

This is caused by
  commit ba1f2f93ef58c8dd935add3e215facdd4a589d12
    Bug 19058: Move C4::Reserves::GetReserveId to the Koha namespace

We are calling ->reserve_id on a Koha::Holds set.

Test plan:
- Serials -> Find subscription -> "Edit routing list" in the sidebar
- Add 1+ recipients
- Save -> "Save and preview routing slip"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Jonathan Druart 2017-12-07 12:40:42 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 5 Nick Clemens 2017-12-13 17:44:40 UTC
Pushed to stable for 17.11.01, awesome work all!
Comment 6 Fridolin Somers 2017-12-20 07:44:21 UTC
Bug 19058 not in 17.05.x
Comment 7 Katrin Fischer 2017-12-21 13:34:04 UTC
We seem to have the same problem in 16.11 - but the patch here doesn't apply and the errors are different:

Can't call method "branchname" on an undefined value at /home/vagrant/kohaclone/serials/routing-preview.pl line 69.

I will file a new bug report.