Bugzilla – Attachment 24565 Details for
Bug 10402
Add multiple contacts for vendors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10402 follow-up: rebase onto latest master
Bug-10402-follow-up-rebase-onto-latest-master.patch (text/plain), 5.04 KB, created by
Jared Camins-Esakov
on 2014-01-20 04:46:14 UTC
(
hide
)
Description:
Bug 10402 follow-up: rebase onto latest master
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2014-01-20 04:46:14 UTC
Size:
5.04 KB
patch
obsolete
>From 9011dd5196a8a71bdedafc2547faaf25461acf9c Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Thu, 12 Sep 2013 09:29:40 -0400 >Subject: [PATCH] Bug 10402 follow-up: rebase onto latest master > >Because of the complexity of the rebase, I have chosen to correct >a couple merge errors in a separate patch rather than squashing the >corrections into the last patch in the patchset. > >This rebase patch does one thing that may not be completely obvious: >in order to keep the existing tests matching their stated aims, it >centralizes contact-related unit testing at the end of the Bookseller.t >unit test, and removes contacts from earlier tests. >--- > C4/Bookseller.pm | 4 ++-- > t/db_dependent/Bookseller.t | 43 ++++--------------------------------------- > 2 files changed, 6 insertions(+), 41 deletions(-) > >diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm >index 4386bb4..702b37c 100644 >--- a/C4/Bookseller.pm >+++ b/C4/Bookseller.pm >@@ -248,7 +248,7 @@ sub ModBookseller { > discount=?,notes=?,gstrate=?,deliverytime=? > WHERE id=?'; > my $sth = $dbh->prepare($query); >- return $sth->execute( >+ my $cnt = $sth->execute( > $data->{'name'}, $data->{'address1'}, > $data->{'address2'}, $data->{'address3'}, > $data->{'address4'}, $data->{'postal'}, >@@ -278,7 +278,7 @@ sub ModBookseller { > } > $sth = $dbh->prepare($contactquery); > $sth->execute(@contactparams); >- return; >+ return $cnt; > } > > =head2 DelBookseller >diff --git a/t/db_dependent/Bookseller.t b/t/db_dependent/Bookseller.t >index d1a0f1d..52feabf 100644 >--- a/t/db_dependent/Bookseller.t >+++ b/t/db_dependent/Bookseller.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > >-use Test::More tests => 72; >+use Test::More tests => 69; > use C4::Context; > use Koha::DateUtils; > use DateTime::Duration; >@@ -50,13 +50,6 @@ my $sample_supplier1 = { > accountnumber => 'accountnumber1', > fax => 'fax1', > url => 'url1', >- contact => 'contact1', >- contpos => 'contpos1', >- contphone => 'contphone1', >- contfax => 'contefax1', >- contaltphone => 'contaltphone1', >- contemail => 'contemail1', >- contnotes => 'contnotes1', > active => 1, > gstreg => 1, > listincgst => 1, >@@ -77,13 +70,6 @@ my $sample_supplier2 = { > accountnumber => 'accountnumber2', > fax => 'fax2', > url => 'url2', >- contact => 'contact2', >- contpos => 'contpos2', >- contphone => 'contphone2', >- contfax => 'contefax2', >- contaltphone => 'contaltphone2', >- contemail => 'contemail2', >- contnotes => 'contnotes2', > active => 1, > gstreg => 1, > listincgst => 1, >@@ -91,7 +77,7 @@ my $sample_supplier2 = { > gstrate => '2.0000', > discount => '2.0000', > notes => 'notes2', >- deliverytime => 2, >+ deliverytime => 2 > }; > > my $id_supplier1 = C4::Bookseller::AddBookseller($sample_supplier1); >@@ -231,13 +217,6 @@ $sample_supplier2 = { > accountnumber => 'accountnumber2 modified', > fax => 'fax2 modified', > url => 'url2 modified', >- contact => 'contact2 modified', >- contpos => 'contpos2 modified', >- contphone => 'contphone2 modified', >- contfax => 'contefax2 modified', >- contaltphone => 'contaltphone2 modified', >- contemail => 'contemail2 modified', >- contnotes => 'contnotes2 modified', > active => 1, > gstreg => 1, > listincgst => 1, >@@ -278,13 +257,6 @@ my $sample_supplier3 = { > accountnumber => 'accountnumber3', > fax => 'fax3', > url => 'url3', >- contact => 'contact3', >- contpos => 'contpos3', >- contphone => 'contphone3', >- contfax => 'contefax3', >- contaltphone => 'contaltphone3', >- contemail => 'contemail3', >- contnotes => 'contnotes3', > active => 1, > gstreg => 1, > listincgst => 1, >@@ -305,13 +277,6 @@ my $sample_supplier4 = { > accountnumber => 'accountnumber4', > fax => 'fax4', > url => 'url4', >- contact => 'contact4', >- contpos => 'contpos4', >- contphone => 'contphone4', >- contfax => 'contefax4', >- contaltphone => 'contaltphone4', >- contemail => 'contemail4', >- contnotes => 'contnotes4', > active => 1, > gstreg => 1, > listincgst => 1, >@@ -677,7 +642,7 @@ my $booksellerid = C4::Bookseller::AddBookseller( > ] > ); > >-my @booksellers = C4::Bookseller::GetBookSeller('my vendor'); >+@booksellers = C4::Bookseller::GetBookSeller('my vendor'); > ok( > ( grep { $_->{'id'} == $booksellerid } @booksellers ), > 'GetBookSeller returns correct record when passed a name' >@@ -738,7 +703,7 @@ sub field_filter { > 'bookselleremail', 'booksellerfax', > 'booksellerurl', 'othersupplier', > 'currency', 'invoiceprice', >- 'listprice' >+ 'listprice', 'contacts' > ) > { > >-- >1.7.9.5
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 10402
:
18973
|
18974
|
18975
|
19233
|
19234
|
19235
|
19603
|
19604
|
19808
|
19809
|
19810
|
20019
|
20020
|
20021
|
20045
|
20046
|
20047
|
20048
|
20559
|
20560
|
20561
|
20562
|
21019
|
21020
|
21021
|
21022
|
21023
|
21056
|
21547
|
21549
|
21804
|
23370
|
23371
|
23372
|
23373
|
23374
|
23375
|
23376
|
23377
|
24561
|
24562
|
24563
|
24564
|
24565
|
24566
|
24567
|
24568
|
29223
|
29224
|
29225
|
29226
|
29227
|
29511
|
29600
|
29601
|
29602
|
29603
|
29604
|
29761
|
30209
|
30210
|
30211
|
30212
|
30213
|
30460
|
30461
|
30462
|
30463
|
30464
|
31091
|
31092
|
31093
|
31094
|
31095
|
31096