Bug 19194

Summary: Internal server error when receiving an order with no itemtype
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: AcquisitionsAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: blocker    
Priority: P5 - low CC: fridolin.somers, hagud, katrin.fischer, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21842
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17843    
Bug Blocks:    
Attachments: Bug 19194: Check itemtype is defined when receiving an order
Bug 19194: Check itemtype is defined when receiving an order
Bug 19194: Check itemtype is defined when receiving an order

Description Aleisha Amohia 2017-08-29 04:51:28 UTC
To reproduce:
1) Find a record with an item that has no itemtype (or remove the itemtype of an item)
2) Go to Acquisitions -> Find a vendor or make a new one -> create a new basket
3) Add the record from Step 1 to your basket
4) Close the basket
5) Go back to the vendor and click 'Receive shipments'
6) Put in an invoice number, click Next
7) Click the Receive link for your item
8) Confirm you see an internal server error

In the error log: Can't call method "description" on an undefined value at /home/vagrant/kohaclone/acqui/orderreceive.pl line 150.
Comment 1 Aleisha Amohia 2017-08-29 04:53:15 UTC
Created attachment 66573 [details] [review]
Bug 19194: Check itemtype is defined when receiving an order

To test:
1) Find a record with an item that has no itemtype (or remove the
itemtype of an item)
2) Go to Acquisitions -> Find a vendor or make a new one -> create a new
basket
3) Add the record from Step 1 to your basket
4) Close the basket
5) Go back to the vendor and click 'Receive shipments'
6) Put in an invoice number, click Next
7) Click the Receive link for your item
8) Confirm you see an internal server error
9) Apply the patch and refresh the page
10) The error should be gone and behaviour should continue as expected

Sponsored-by: Catalyst IT
Comment 2 Hugo Agud 2017-08-31 10:31:29 UTC
I am going to check this patch, just one quick question.. when you say itemtype you refer to items.itype right? itemtype If I am not wrong refers to tag 942$c of the bibliografic

according the text I guess you're refereing to itype, please may you confirm?
Comment 3 Lee Jamison 2017-08-31 16:07:13 UTC
Created attachment 66674 [details] [review]
Bug 19194: Check itemtype is defined when receiving an order

To test:
1) Find a record with an item that has no itemtype (or remove the
itemtype of an item)
2) Go to Acquisitions -> Find a vendor or make a new one -> create a new
basket
3) Add the record from Step 1 to your basket
4) Close the basket
5) Go back to the vendor and click 'Receive shipments'
6) Put in an invoice number, click Next
7) Click the Receive link for your item
8) Confirm you see an internal server error
9) Apply the patch and refresh the page
10) The error should be gone and behaviour should continue as expected

Sponsored-by: Catalyst IT

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 4 Aleisha Amohia 2017-08-31 20:40:23 UTC
(In reply to Hugo Agud from comment #2)
> I am going to check this patch, just one quick question.. when you say
> itemtype you refer to items.itype right? itemtype If I am not wrong refers
> to tag 942$c of the bibliografic
> 
> according the text I guess you're refereing to itype, please may you confirm?

I did mean itemtype as in tag 942c
Comment 5 Marcel de Rooy 2017-09-01 05:43:09 UTC
Created attachment 66682 [details] [review]
Bug 19194: Check itemtype is defined when receiving an order

To test:
1) Find a record with an item that has no itemtype (or remove the
itemtype of an item)
2) Go to Acquisitions -> Find a vendor or make a new one -> create a new
basket
3) Add the record from Step 1 to your basket
4) Close the basket
5) Go back to the vendor and click 'Receive shipments'
6) Put in an invoice number, click Next
7) Click the Receive link for your item
8) Confirm you see an internal server error
9) Apply the patch and refresh the page
10) The error should be gone and behaviour should continue as expected

Sponsored-by: Catalyst IT

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Jonathan Druart 2017-09-01 16:09:04 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 7 Fridolin Somers 2017-09-12 14:31:49 UTC
Depends on Bug 17843 but can easily adapt for 17.05.x
Comment 8 Fridolin Somers 2017-09-12 14:37:00 UTC
Pushed to 17.05.x, will be in 17.05.04.


Depends on Bug 17843 but can easily adapt for 17.05.x
Comment 9 Katrin Fischer 2017-09-15 23:28:40 UTC
Depending bug is not in 16.11.x
Comment 10 Jonathan Druart 2017-10-10 14:03:31 UTC
*** Bug 19063 has been marked as a duplicate of this bug. ***