Bug 13201 - GetSuggestion takes suggestionid
Summary: GetSuggestion takes suggestionid
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
Depends on:
Reported: 2014-11-05 11:41 UTC by Jonathan Druart
Modified: 2015-12-03 22:03 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:

Bug 13201: GetSuggestion takes suggestionid (1.35 KB, patch)
2014-11-05 11:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED OFF] Bug 13201: GetSuggestion takes suggestionid (2.16 KB, patch)
2014-11-05 22:47 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 13201: GetSuggestion takes suggestionid (2.21 KB, patch)
2014-11-06 20:58 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-11-05 11:41:09 UTC
The pod and the variable names are wrong!
This could be dangerous.
Comment 1 Jonathan Druart 2014-11-05 11:42:47 UTC Comment hidden (obsolete)
Comment 2 M. Tompsett 2014-11-05 22:47:36 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-11-06 20:58:41 UTC
Created attachment 33349 [details] [review]
[PASSED QA] Bug 13201: GetSuggestion takes suggestionid

Having $ordernumber as the parameter in a function which is
handling suggestions and it is used as a suggestion id is
confusing to the coder and person trying to read the code.
This patch corrects the confusion.

1) perldoc C4::Suggestions
   -- notice it says ordernumber for the GetSuggestions example.
2) Ensure you have CPL in your branches table.
3) prove -v t/db_dependent/Suggestions.t
   -- if you have more than 8 itemtypes in your database, two
      tests at the end will fail, but that is not relevant to
      the modified GetSuggestions code.
4) apply patch
5) perldoc C4::Suggestions
   -- notice it is corrected now.
6) prove -v t/db_dependent/Suggestions.t
   -- it should run with the same results as in step 3.
      That is, if you have 8 itemtypes, all pass, otherwise
      those two tests fail.
7) run koha qa test tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2015-02-09 18:57:03 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 5 Chris Cormack 2015-02-12 22:47:28 UTC
Pushed to 3.18.x will be in 3.18.4
Comment 6 Mason James 2015-02-26 04:30:16 UTC
Pushed to 3.16.x, will be in 3.16.8