Bug 10640 - ModBookseller needs more explicit return values in C4::Bookseller.pm
Summary: ModBookseller needs more explicit return values in C4::Bookseller.pm
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: kenza
QA Contact: Testopia
URL:
Keywords:
Depends on: 10528
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 07:49 UTC by kenza
Modified: 2014-12-07 20:02 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
ModBookseller needs more explicit return values in C4::Bookseller.pm (2.80 KB, patch)
2013-07-25 08:07 UTC, kenza
Details | Diff | Splinter Review
ModBookseller needs more explicit return values in C4::Bookseller.pm (2.87 KB, patch)
2013-07-25 08:20 UTC, kenza
Details | Diff | Splinter Review
[SIGNED-OFF] ModBookseller needs more explicit return values in C4::Bookseller.pm (2.93 KB, patch)
2013-07-31 02:25 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
[PASSED QA] ModBookseller needs more explicit return values in C4::Bookseller.pm (3.10 KB, patch)
2013-08-25 12:54 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 kenza 2013-07-25 07:49:55 UTC

    
Comment 1 kenza 2013-07-25 08:07:44 UTC Comment hidden (obsolete)
Comment 2 kenza 2013-07-25 08:20:43 UTC Comment hidden (obsolete)
Comment 3 Srdjan Jankovic 2013-07-31 02:25:02 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2013-08-25 12:54:58 UTC
Created attachment 20587 [details] [review]
[PASSED QA] ModBookseller needs more explicit return values in C4::Bookseller.pm

Before, ModBookseller always returns undef. This patch modifies it in order to be more explicit.
Now it returns :
1 -> If a modification has been done
0E0 -> If the given id doesn't exist
undef -> If no id given

It also fix one of the tests which didn't pass before in t/db_dependent/Bookseller.t

To Test:
prove t/db_dependent/Bookseller.t
Bookseller.t .. 1/54
[Some warnings about uninitialized values]
t/db_dependent/Bookseller.t .. ok
All tests successful.
Files=1, Tests=54,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.46 cusr  0.04 csys =  0.53 CPU)
Result: PASS

http://bugs.koha-community.org/show_bug.cgi?id=10640

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Change is logical and passes new and old tests.
Fixed the author line to have Kenza's correct email address.
Comment 5 Galen Charlton 2013-09-08 20:38:02 UTC
Pushed to master.  Thanks, Kenza!