Bug 19194 - Internal server error when receiving an order with no itemtype
Summary: Internal server error when receiving an order with no itemtype
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low blocker (vote)
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
: 19063 (view as bug list)
Depends on: 17843
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-29 04:51 UTC by Aleisha Amohia
Modified: 2017-10-10 14:03 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19194: Check itemtype is defined when receiving an order (1.51 KB, patch)
2017-08-29 04:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19194: Check itemtype is defined when receiving an order (1.56 KB, patch)
2017-08-31 16:07 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 19194: Check itemtype is defined when receiving an order (1.66 KB, patch)
2017-09-01 05:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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. ***