Bug 13947 - serials/subscription-history.pl calls GetBiblio incorrectly
Summary: serials/subscription-history.pl calls GetBiblio incorrectly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Mark Tompsett
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 15:00 UTC by Mark Tompsett
Modified: 2015-12-03 22:03 UTC (History)
4 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
Bug 13947: Correct call to GetBiblio to receive correct return value (1.45 KB, patch)
2015-04-02 15:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 13947: Correct call to GetBiblio to receive correct return value (1.51 KB, patch)
2015-04-02 16:05 UTC, Jacek Ablewicz
Details | Diff | Splinter Review
[PASSED QA] Bug 13947: Correct call to GetBiblio to receive correct return value (1.58 KB, patch)
2015-04-03 17:27 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

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