Bugzilla – Attachment 138908 Details for
Bug 31306
Add Koha::Items->search_ordered method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31306: (QA follow-up) Add comments to test
Bug-31306-QA-follow-up-Add-comments-to-test.patch (text/plain), 3.82 KB, created by
Nick Clemens (kidclamp)
on 2022-08-09 12:58:53 UTC
(
hide
)
Description:
Bug 31306: (QA follow-up) Add comments to test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-08-09 12:58:53 UTC
Size:
3.82 KB
patch
obsolete
>From 31e6b2e1a1f2fc7f6282d255127876dcd5b2cb50 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 9 Aug 2022 12:57:24 +0000 >Subject: [PATCH] Bug 31306: (QA follow-up) Add comments to test > >--- > t/db_dependent/Koha/Items.t | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t >index 77d4b7d2ff..980bd3d983 100755 >--- a/t/db_dependent/Koha/Items.t >+++ b/t/db_dependent/Koha/Items.t >@@ -1835,7 +1835,8 @@ subtest 'search_ordered' => sub { > $item2->discard_changes->update( { homebranch => $library_a->branchcode } ); > $item3->discard_changes->update( { homebranch => $library_z->branchcode } ); > is_deeply( [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], >- [ $item2->itemnumber, $item1->itemnumber, $item3->itemnumber ] ); >+ [ $item2->itemnumber, $item1->itemnumber, $item3->itemnumber ], >+ "not a serial - order by homebranch" ); > > # order_by me.enumchron > $biblio->items->update( { homebranch => $library_a->branchcode } ); >@@ -1843,7 +1844,8 @@ subtest 'search_ordered' => sub { > $item2->discard_changes->update( { enumchron => 'bb' } ); > $item3->discard_changes->update( { enumchron => 'aa' } ); > is_deeply( [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], >- [ $item3->itemnumber, $item2->itemnumber, $item1->itemnumber ] ); >+ [ $item3->itemnumber, $item2->itemnumber, $item1->itemnumber ], >+ "not a serial - order by enumchron" ); > > # order_by LPAD( me.copynumber, 8, '0' ) > $biblio->items->update( { enumchron => undef } ); >@@ -1851,7 +1853,8 @@ subtest 'search_ordered' => sub { > $item2->discard_changes->update( { copynumber => '34567890' } ); > $item3->discard_changes->update( { copynumber => '23456789' } ); > is_deeply( [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], >- [ $item1->itemnumber, $item3->itemnumber, $item2->itemnumber ] ); >+ [ $item1->itemnumber, $item3->itemnumber, $item2->itemnumber ], >+ "not a serial - order by LPAD( me.copynumber, 8, '0' )" ); > > # order_by -desc => 'me.dateaccessioned' > $biblio->items->update( { copynumber => undef } ); >@@ -1859,7 +1862,8 @@ subtest 'search_ordered' => sub { > $item2->discard_changes->update( { dateaccessioned => '2022-07-19' } ); > $item3->discard_changes->update( { dateaccessioned => '2022-09-19' } ); > is_deeply( [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], >- [ $item3->itemnumber, $item1->itemnumber, $item2->itemnumber ] ); >+ [ $item3->itemnumber, $item1->itemnumber, $item2->itemnumber ], >+ "not a serial - order by date accessioned desc" ); > } > > { # Is a serial >@@ -1913,7 +1917,8 @@ subtest 'search_ordered' => sub { > $serial3->discard_changes->update( { publisheddate => '2022-08-19' } ); > is_deeply( > [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], >- [ $item2->itemnumber, $item3->itemnumber, $item1->itemnumber ] >+ [ $item2->itemnumber, $item3->itemnumber, $item1->itemnumber ], >+ "serial - order by publisheddate" > ); > > # order_by me.enumchron >@@ -1924,7 +1929,8 @@ subtest 'search_ordered' => sub { > $item2->discard_changes->update( { enumchron => 'bb' } ); > $item3->discard_changes->update( { enumchron => 'aa' } ); > is_deeply( [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], >- [ $item3->itemnumber, $item2->itemnumber, $item1->itemnumber ] ); >+ [ $item3->itemnumber, $item2->itemnumber, $item1->itemnumber ], >+ "serial - order by enumchron" ); > > } > >-- >2.30.2
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 31306
:
138806
|
138807
|
138808
|
138838
|
138839
|
138840
|
138905
|
138906
|
138907
| 138908