Bugzilla – Attachment 97957 Details for
Bug 12469
Add more information to the ILS-DI results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12469: Moved callnumber to a specific XML node in reply
Bug-12469-Moved-callnumber-to-a-specific-XML-node-.patch (text/plain), 4.97 KB, created by
Arthur Suzuki
on 2020-01-27 02:54:55 UTC
(
hide
)
Description:
Bug 12469: Moved callnumber to a specific XML node in reply
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2020-01-27 02:54:55 UTC
Size:
4.97 KB
patch
obsolete
>From 581a822762ce9d07aeb5ae36c3800816429dc372 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Mon, 27 Jan 2020 03:41:17 +0100 >Subject: [PATCH] Bug 12469: Moved callnumber to a specific XML node in reply > >--- > C4/ILSDI/Services.pm | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 7c09268e0f..958885adcc 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -121,7 +121,7 @@ sub GetAvailability { > > foreach my $id ( split( / /, $cgi->param('id') ) ) { > if ( $cgi->param('id_type') eq "item" ) { >- my ( $biblionumber, $status, $msg, $location ) = _availability($id); >+ my ( $biblionumber, $status, $msg, $location, $callnum, $duedate ) = _availability($id); > $out .= " <dlf:record>\n"; > $out .= " <dlf:bibliographic id=\"" . ( $biblionumber || $id ) . "\" />\n"; > $out .= " <dlf:items>\n"; >@@ -131,6 +131,7 @@ sub GetAvailability { > $out .= " <dlf:availabilitystatus>" . $status . "</dlf:availabilitystatus>\n"; > if ($msg) { $out .= " <dlf:availabilitymsg>" . $msg . "</dlf:availabilitymsg>\n"; } > if ($location) { $out .= " <dlf:location>" . $location . "</dlf:location>\n"; } >+ if ($callnum) { $out .= " <dlf:callnumber>" . $callnum . "</dlf:callnumber>\n"; } > if ($duedate) { $out .= " <dlf:dateavailable>" . $duedate . "</dlf:dateavailable>\n"; } > $out .= " </dlf:simpleavailability>\n"; > $out .= " </dlf:item>\n"; >@@ -148,13 +149,15 @@ sub GetAvailability { > # We loop over the items to clean them > while ( my $item = $items->next ) { > my $itemnumber = $item->itemnumber; >- my ( $biblionumber, $status, $msg, $location ) = _availability($itemnumber); >+ my ( $biblionumber, $status, $msg, $location, $callnum, $duedate ) = _availability($itemnumber); > $out .= " <dlf:item id=\"" . $itemnumber . "\">\n"; > $out .= " <dlf:simpleavailability>\n"; > $out .= " <dlf:identifier>" . $itemnumber . "</dlf:identifier>\n"; > $out .= " <dlf:availabilitystatus>" . $status . "</dlf:availabilitystatus>\n"; > if ($msg) { $out .= " <dlf:availabilitymsg>" . $msg . "</dlf:availabilitymsg>\n"; } > if ($location) { $out .= " <dlf:location>" . $location . "</dlf:location>\n"; } >+ if ($callnum) { $out .= " <dlf:callnumber>" . $callnum . "</dlf:callnumber>\n"; } >+ if ($duedate) { $out .= " <dlf:dateavailable>" . $duedate . "</dlf:dateavailable>\n"; } > $out .= " </dlf:simpleavailability>\n"; > $out .= " </dlf:item>\n"; > } >@@ -860,7 +863,7 @@ sub CancelHold { > > Returns, for an itemnumber, an array containing availability information. > >- my ($biblionumber, $status, $msg, $location) = _availability($id); >+ my ($biblionumber, $status, $msg, $location, $callnumber, duedate) = _availability($id); > > =cut > >@@ -872,27 +875,26 @@ sub _availability { > return ( undef, 'unknown', 'Error: could not retrieve availability for this ID', undef ); > } > >- > my $biblionumber = $item->biblioitemnumber; > my $library = Koha::Libraries->find( $item->holdingbranch ); > my $location = $library ? $library->branchname : ''; >- $location .= ", Call # $item->{itemcallnumber}" if $item->{itemcallnumber}; >+ my $callnumber = $item->itemcallnumber; > > if ( $item->notforloan ) { >- return ( $biblionumber, 'not available', 'Not for loan', $location ); >+ return ( $biblionumber, 'not available', 'Not for loan', $location, $callnumber ); > } elsif ( $item->{'onloan'} ) { > return ( > $biblionumber, 'not available', 'Checked out', >- $location, $item->{'onloan'} >+ $location, $item->itemcallnumber, $item->{'onloan'} > ); > } elsif ( $item->{'itemlost'} ) { >- return ( $biblionumber, 'not available', 'Item lost', $location ); >+ return ( $biblionumber, 'not available', 'Item lost', $location, $callnumber ); > } elsif ( $item->withdrawn ) { >- return ( $biblionumber, 'not available', 'Item withdrawn', $location ); >+ return ( $biblionumber, 'not available', 'Item withdrawn', $location, $callnumber ); > } elsif ( $item->damaged ) { >- return ( $biblionumber, 'not available', 'Item damaged', $location ); >+ return ( $biblionumber, 'not available', 'Item damaged', $location, $callnumber ); > } else { >- return ( $biblionumber, 'available', undef, $location ); >+ return ( $biblionumber, 'available', undef, $location, $callnumber, Koha::DateUtils::dt_from_string( DateTime->now )); > } > } > >-- >2.20.1
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 12469
:
29183
|
29201
|
29202
|
97955
|
97956
| 97957 |
97958