Summary: | Order receive page dies if quantity received is more than 0 | ||
---|---|---|---|
Product: | Koha | Reporter: | Emmi Takkinen <emmi.takkinen> |
Component: | Acquisitions | Assignee: | Emmi Takkinen <emmi.takkinen> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | nick |
Version: | 21.11 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 23376 | ||
Bug Blocks: | |||
Attachments: | Bug 23376: Fix template error on order receive page |
Description
Emmi Takkinen
2022-03-21 06:48:38 UTC
Created attachment 131939 [details] Bug 23376: Fix template error on order receive page Order receive page dies on error 500 if orders quantityreceived is more than 0. The error logs reads: "Template process failed: undef error - The method Koha::Item->count is not covered by tests!" In template orderreceive.tt we have "order.items.count" not "orders.items.count" as it should be. Note! It seems that this error doesn't occur if template param edit is set as 1. I can't seem to trigger this, can you give a detailed test plan? (In reply to Nick Clemens from comment #2) > I can't seem to trigger this, can you give a detailed test plan? It seems order also needs to have items listing. I'm now looking at two orders, both with quantityreceived 1 and only one of those which has items linked to it is throwing error 500. I'll provide new test plan after I've confirmed this. (In reply to Emmi Takkinen from comment #3) > (In reply to Nick Clemens from comment #2) > > I can't seem to trigger this, can you give a detailed test plan? > > It seems order also needs to have items listing. I'm now looking at two > orders, both with quantityreceived 1 and only one of those which has items > linked to it is throwing error 500. I'll provide new test plan after I've > confirmed this. Been testing this in master and version 21.11.xx and it looks like this problem is only present in 21.11. In master we still have order.items.count and since order receive page works there without problem, it seems that line wasn't incorrect after all. Could it be something was fixed in master that fixed this? Comment on attachment 131939 [details] Bug 23376: Fix template error on order receive page Obsoleting patch since it doesn't actually fix the problem. So I've been testing this and it occurs in version 21.11.03 and the conditions are following: - order has _only one item_ attached to it - orders quantityreceived value is more than 0 For some reason when there's only one item on order template orderreceived.tt handles it as Koha::Item, not Koha::Items as it should, thus "Koha::Item->count is not covered by tests!". In orderreceived.pl order->items returns Koha::Items. Hi Emmi, do you still see this issue and could you add a step by step on how to reproduce it? Still seeing this on 21.11. To test: 1. Find order with one item and with quantity received as 1. 2. Navigate to receive this order from parcel.pl. 3. Click "Receive". OR 4. Use direct link to the order: /cgi-bin/koha/acqui/orderreceive.pl?ordernumber=<ordernumber>&invoiceid=<invoiceid> => error 500 is raised (In reply to Emmi Takkinen from comment #8) > Still seeing this on 21.11. > > To test: > 1. Find order with one item and with quantity received as 1. > 2. Navigate to receive this order from parcel.pl. > 3. Click "Receive". > OR > 4. Use direct link to the order: > /cgi-bin/koha/acqui/orderreceive. > pl?ordernumber=<ordernumber>&invoiceid=<invoiceid> > => error 500 is raised Can you describe the basket settings? When are items being created? I could use a full walkthrough from basket creation to error as I am not overly familiar with acquisitions workflows (In reply to Emmi Takkinen from comment #8) > Still seeing this on 21.11. > > To test: > 1. Find order with one item and with quantity received as 1. Wondering about this line - did you mean quantity ordered or indeed quantity received? If the item has been "fully" received, it should not show int he list of toe receive order lines. Could this be a data issue? (In reply to Katrin Fischer from comment #10) > (In reply to Emmi Takkinen from comment #8) > > Still seeing this on 21.11. > > > > To test: > > 1. Find order with one item and with quantity received as 1. > > Wondering about this line - did you mean quantity ordered or indeed quantity > received? If the item has been "fully" received, it should not show int he > list of toe receive order lines. > > Could this be a data issue? I'm quite sure this caused by issue described in bugĀ 32472. |