Lines 1842-1852
sub recall {
Link Here
|
1842 |
}, |
1842 |
}, |
1843 |
{ order_by => { -asc => 'created_date' } } |
1843 |
{ order_by => { -asc => 'created_date' } } |
1844 |
)->as_list; |
1844 |
)->as_list; |
|
|
1845 |
|
1846 |
my $item_level_recall; |
1845 |
foreach my $recall (@recalls) { |
1847 |
foreach my $recall (@recalls) { |
1846 |
if ( $recall->item_level and $recall->item_id == $self->itemnumber ){ |
1848 |
if ( $recall->item_level ) { |
1847 |
return $recall; |
1849 |
$item_level_recall = 1; |
|
|
1850 |
if ( $recall->item_id == $self->itemnumber ){ |
1851 |
return $recall; |
1852 |
} |
1848 |
} |
1853 |
} |
1849 |
} |
1854 |
} |
|
|
1855 |
if ( $item_level_recall ) { |
1856 |
# recall needs to be filled be a specific item only |
1857 |
# no other item is relevant to return |
1858 |
return; |
1859 |
} |
1850 |
# no item-level recall to return, so return earliest biblio-level |
1860 |
# no item-level recall to return, so return earliest biblio-level |
1851 |
# FIXME: eventually this will be based on priority |
1861 |
# FIXME: eventually this will be based on priority |
1852 |
return $recalls[0]; |
1862 |
return $recalls[0]; |