Bug 18525

Summary: Can't create order line from accepted suggestion
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jonathan.druart, kyle, mtj
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14828    
Bug Blocks:    
Attachments: Bug 18525: (bug 14828 follow-up) FIX ordering from suggestion when item-level_itypes = biblio
[SIGNED OFF] Bug 18525: (bug 14828 follow-up) FIX ordering from suggestion when item-level_itypes = biblio
Bug 18525: (bug 14828 follow-up) FIX ordering from suggestion when item-level_itypes = biblio

Description Katrin Fischer 2017-05-02 21:47:22 UTC
When I try to create an order line from an accepted suggestion, I get an error:

Template process failed: undef error - The method selected is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.

Can someone confirm?
Comment 1 Katrin Fischer 2017-05-02 22:10:55 UTC
The problem appears, when item-level_itypes = biblio.
Comment 2 Jonathan Druart 2017-05-02 22:15:45 UTC
Created attachment 62997 [details] [review]
Bug 18525: (bug 14828 follow-up) FIX ordering from suggestion when item-level_itypes = biblio

When ordering from a suggestion with item-level_itypes = biblio the app
crashes with
Template process failed: undef error - The method selected is not
covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.

C4::ItemTypes->all did not set a selected flag. The item type is only
display when ordering (and not modifying an order).
The flag is never set, the test can be removed.

Test plan: Confirm that the error is gone
Comment 3 Katrin Fischer 2017-05-02 22:25:07 UTC
Created attachment 62998 [details] [review]
[SIGNED OFF] Bug 18525: (bug 14828 follow-up) FIX ordering from suggestion when item-level_itypes = biblio

When ordering from a suggestion with item-level_itypes = biblio the app
crashes with
Template process failed: undef error - The method selected is not
covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.

C4::ItemTypes->all did not set a selected flag. The item type is only
display when ordering (and not modifying an order).
The flag is never set, the test can be removed.

Test plan: Confirm that the error is gone

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Nick Clemens 2017-05-10 10:02:36 UTC
Created attachment 63327 [details] [review]
Bug 18525: (bug 14828 follow-up) FIX ordering from suggestion when item-level_itypes = biblio

When ordering from a suggestion with item-level_itypes = biblio the app
crashes with
Template process failed: undef error - The method selected is not
covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.

C4::ItemTypes->all did not set a selected flag. The item type is only
display when ordering (and not modifying an order).
The flag is never set, the test can be removed.

Test plan: Confirm that the error is gone

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Kyle M Hall 2017-05-12 12:50:54 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 6 Katrin Fischer 2017-05-14 09:51:00 UTC
This patch has been pushed to 16.11.x and will be in 16.11.08.
Comment 7 Mason James 2017-05-24 02:34:57 UTC
Pushed to 16.05.x, for 16.05.13 release