Bugzilla – Attachment 33349 Details for
Bug 13201
GetSuggestion takes suggestionid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13201: GetSuggestion takes suggestionid
PASSED-QA-Bug-13201-GetSuggestion-takes-suggestion.patch (text/plain), 2.21 KB, created by
Katrin Fischer
on 2014-11-06 20:58:41 UTC
(
hide
)
Description:
[PASSED QA] Bug 13201: GetSuggestion takes suggestionid
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-11-06 20:58:41 UTC
Size:
2.21 KB
patch
obsolete
>From 8b0b2d223dd82c5b025e5e32354f00261cc644d7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 5 Nov 2014 12:41:13 +0100 >Subject: [PATCH] [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. > >REVISED TEST PLAN >----------------- >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> >--- > C4/Suggestions.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index b543293..dbc3e5e 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -201,9 +201,9 @@ sub SearchSuggestion { > > =head2 GetSuggestion > >-\%sth = &GetSuggestion($ordernumber) >+\%sth = &GetSuggestion($suggestionid) > >-this function get the detail of the suggestion $ordernumber (input arg) >+this function get the detail of the suggestion $suggestionid (input arg) > > return : > the result of the SQL query as a hash : $sth->fetchrow_hashref. >@@ -211,7 +211,7 @@ return : > =cut > > sub GetSuggestion { >- my ($ordernumber) = @_; >+ my ($suggestionid) = @_; > my $dbh = C4::Context->dbh; > my $query = q{ > SELECT * >@@ -219,7 +219,7 @@ sub GetSuggestion { > WHERE suggestionid=? > }; > my $sth = $dbh->prepare($query); >- $sth->execute($ordernumber); >+ $sth->execute($suggestionid); > return ( $sth->fetchrow_hashref ); > } > >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13201
:
33243
|
33282
| 33349