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: master
Hardware: All All
: P5 - low minor (vote)
Assignee: M. Tompsett
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 15:00 UTC by M. Tompsett
Modified: 2015-12-03 22:03 UTC (History)
4 users (show)

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


Attachments
Bug 13947: Correct call to GetBiblio to receive correct return value (1.45 KB, patch)
2015-04-02 15:22 UTC, M. 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
Details | Diff | Splinter Review

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