Lines 1792-1798
subtest 'move_to_biblio() tests' => sub {
Link Here
|
1792 |
|
1792 |
|
1793 |
subtest 'search_ordered' => sub { |
1793 |
subtest 'search_ordered' => sub { |
1794 |
|
1794 |
|
1795 |
plan tests => 9; |
1795 |
plan tests => 8; |
1796 |
|
1796 |
|
1797 |
$schema->storage->txn_begin; |
1797 |
$schema->storage->txn_begin; |
1798 |
|
1798 |
|
Lines 1824-1840
subtest 'search_ordered' => sub {
Link Here
|
1824 |
[ $item3->itemnumber, $item2->itemnumber, $item1->itemnumber ], |
1824 |
[ $item3->itemnumber, $item2->itemnumber, $item1->itemnumber ], |
1825 |
"not a serial - order by enumchron" ); |
1825 |
"not a serial - order by enumchron" ); |
1826 |
|
1826 |
|
1827 |
# order_by LPAD( me.copynumber, 8, '0' ) |
|
|
1828 |
$biblio->items->update( { enumchron => undef } ); |
1829 |
$item1->discard_changes->update( { copynumber => '12345678' } ); |
1830 |
$item2->discard_changes->update( { copynumber => '34567890' } ); |
1831 |
$item3->discard_changes->update( { copynumber => '23456789' } ); |
1832 |
is_deeply( [ map { $_->itemnumber } $biblio->items->search_ordered->as_list ], |
1833 |
[ $item1->itemnumber, $item3->itemnumber, $item2->itemnumber ], |
1834 |
"not a serial - order by LPAD( me.copynumber, 8, '0' )" ); |
1835 |
|
1836 |
# order_by -desc => 'me.dateaccessioned' |
1827 |
# order_by -desc => 'me.dateaccessioned' |
1837 |
$biblio->items->update( { copynumber => undef } ); |
1828 |
$biblio->items->update( { enumchron => undef } ); |
1838 |
$item1->discard_changes->update( { dateaccessioned => '2022-08-19' } ); |
1829 |
$item1->discard_changes->update( { dateaccessioned => '2022-08-19' } ); |
1839 |
$item2->discard_changes->update( { dateaccessioned => '2022-07-19' } ); |
1830 |
$item2->discard_changes->update( { dateaccessioned => '2022-07-19' } ); |
1840 |
$item3->discard_changes->update( { dateaccessioned => '2022-09-19' } ); |
1831 |
$item3->discard_changes->update( { dateaccessioned => '2022-09-19' } ); |
1841 |
- |
|
|