Bug 13947

Summary: serials/subscription-history.pl calls GetBiblio incorrectly
Product: Koha Reporter: Mark Tompsett <mtompset>
Component: SerialsAssignee: Mark Tompsett <mtompset>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: abl, chris, colin.campbell, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10906
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 13947: Correct call to GetBiblio to receive correct return value
Bug 13947: Correct call to GetBiblio to receive correct return value
[PASSED QA] Bug 13947: Correct call to GetBiblio to receive correct return value

Description Mark Tompsett 2015-04-02 15:00:19 UTC
While looking at bug 10906, I noticed that this bug existed as well, but it was not reported.

Look at C4/Biblio.pm and find the GetBiblio function. It is obvious that it only returns undef or a HASH reference. However, serials/subscription-history.pl calls it expecting ($count, $biblio), which is wrong.

1) confirm the problem:
    $ git grep "=\s*GetBiblio\s*(" | grep subscription-history
2) apply the patch
3) confirm the fix:
    $ git grep "=\s*GetBiblio\s*(" | grep subscription-history
   -- The return value should be just a single parameter as expected.
4) run koha-qa test tools.
Comment 1 Mark Tompsett 2015-04-02 15:22:55 UTC Comment hidden (obsolete)
Comment 2 Jacek Ablewicz 2015-04-02 16:05:59 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 2015-04-03 17:27:27 UTC
Created attachment 37461 [details] [review]
[PASSED QA] Bug 13947: Correct call to GetBiblio to receive correct return value

When you attempt to edit the manual history for a subscription,
the title is blank. This is a result of an incorrect use of the
GetBiblio function.

TEST PLAN
---------
1) Log in to staff client
2) Serials
3) Search for an existing serial with manual history checked.
   -- creating one as needed is left as an exercise to the reader.
4) Click on the title of the serial for the details page.
5) Go to the Planning tab and click 'Edit History'
   -- Heading will be 'Subscription history for' without a
      title.
6) Apply patch
7) Refresh page.
   -- Heading will include the title correctly.
8) run koha qa test tools

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2015-04-16 17:23:42 UTC
Patch pushed to master.

Thanks Mark!
Comment 5 Chris Cormack 2015-04-21 23:10:15 UTC
Pushed to 3.18.x will be in 3.18.6