Bug 9503 - Link from histsearch via invoicenumber results in error
Summary: Link from histsearch via invoicenumber results in error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Colin Campbell
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-29 11:33 UTC by Colin Campbell
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed patch (2.34 KB, patch)
2013-01-29 12:14 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 9503 Correct name of parameter passed to parcel.pl (2.37 KB, patch)
2013-01-29 16:41 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 9503 Correct name of parameter passed to parcel.pl (2.37 KB, patch)
2013-01-29 16:41 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 9503: Followup Correct name of parameter passed to parcel.pl (1.29 KB, patch)
2013-01-31 13:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Follow up patch signed off (1.36 KB, patch)
2013-01-31 16:07 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 9503 Correct name of parameter passed to parcel.pl (2.45 KB, patch)
2013-02-01 08:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9503: Followup remove unused parameters passed to parcel.pl (1.41 KB, patch)
2013-02-01 08:26 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2013-01-29 11:33:43 UTC
The acq histsearch page displays invoice numbers and allows their selection to retrieve shipments recorded against that invoice. Selection results in an error:

Can't use an undefined value as an ARRAY reference at
/home/koha/kohaclone/acqui/parcel.pl line 160.


Cause of the error is that the the invoice id is passed as invoice whereas parcel.pl expects invoiceid so that GetInvoiceDetails is incorrectly called and returns undef rather than an invoice structure
Comment 1 Colin Campbell 2013-01-29 12:14:34 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2013-01-29 16:41:28 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2013-01-29 16:41:39 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-01-31 13:07:59 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-01-31 13:08:23 UTC
Hi Colin and Galen,
In fact 2 parameters (booksellerid and datereceived) are useless.
They are not used by the histsearch.pl script.
Could one of you sign off this patch please?
Comment 6 Colin Campbell 2013-01-31 16:07:10 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2013-02-01 08:26:36 UTC
Thanks Colin.

Marked as Passed QA.
Comment 8 Jonathan Druart 2013-02-01 08:26:50 UTC
Created attachment 14992 [details] [review]
Bug 9503 Correct name of parameter passed to parcel.pl

invoiceid was being passed as invoice causing GetInvoiceDetails
to silently fail and a system error downstream when
accessing the 'orders' element of the undefined invoice

Added an error message if GetInvoiceDetails called on undef

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 9 Jonathan Druart 2013-02-01 08:26:58 UTC
Created attachment 14993 [details] [review]
Bug 9503: Followup remove unused parameters passed to parcel.pl

The booksellerid and datereceive parameters are useless.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 10 Jared Camins-Esakov 2013-02-01 16:41:02 UTC
How do I get to the histsearch page? I can't seem to find it.
Comment 11 Jonathan Druart 2013-02-04 08:23:33 UTC
(In reply to comment #10)
> How do I get to the histsearch page? I can't seem to find it.

From the acquisition home page, select the "Orders search" tab (in the header) and click on the submit button (or the "advanced search" link).
Comment 12 Jared Camins-Esakov 2013-02-04 12:45:34 UTC
This patch has been pushed to master.
Comment 13 Chris Cormack 2013-02-06 19:15:57 UTC
Pushed to 3.10.x will be in 3.10.3