Bugzilla – Attachment 129490 Details for
Bug 28238
Add itemcallnumber to ILS-DI GetAvailability output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28238: Add itemcallnumber to ils-di GetAvailability output
Bug-28238-Add-itemcallnumber-to-ils-di-GetAvailabi.patch (text/plain), 3.62 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-14 14:28:45 UTC
(
hide
)
Description:
Bug 28238: Add itemcallnumber to ils-di GetAvailability output
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-14 14:28:45 UTC
Size:
3.62 KB
patch
obsolete
>From daf2626bc25dd0e32c01609a38f34df0b6f93f67 Mon Sep 17 00:00:00 2001 >From: Lyon3 Team <koha@univ-lyon3.fr> >Date: Tue, 27 Apr 2021 16:13:39 +0200 >Subject: [PATCH] Bug 28238: Add itemcallnumber to ils-di GetAvailability > output > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/ILSDI/Services.pm | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 34465a7caf..43986779c2 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -119,7 +119,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, $itemcallnumber ) = _availability($id); > > $out .= " <dlf:record>\n"; > $out .= " <dlf:bibliographic id=\"" . ( $biblionumber || $id ) . "\" />\n"; >@@ -130,6 +130,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 ($itemcallnumber) { $out .= " <dlf:itemcallnumber>" . $itemcallnumber. "</dlf:itemcallnumber>\n"; } > $out .= " </dlf:simpleavailability>\n"; > $out .= " </dlf:item>\n"; > $out .= " </dlf:items>\n"; >@@ -146,13 +147,14 @@ 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, $itemcallnumber ) = _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 ($itemcallnumber) { $out .= " <dlf:itemcallnumber>" . $itemcallnumber. "</dlf:itemcallnumber>\n"; } > $out .= " </dlf:simpleavailability>\n"; > $out .= " </dlf:item>\n"; > } >@@ -961,6 +963,7 @@ sub _availability { > my $biblionumber = $item->biblioitemnumber; > my $library = Koha::Libraries->find( $item->holdingbranch ); > my $location = $library ? $library->branchname : ''; >+ my $itemcallnumber = $item->itemcallnumber; > > if ( $item->notforloan ) { > return ( $biblionumber, 'not available', 'Not for loan', $location ); >@@ -973,7 +976,7 @@ sub _availability { > } elsif ( $item->damaged ) { > return ( $biblionumber, 'not available', 'Item damaged', $location ); > } else { >- return ( $biblionumber, 'available', undef, $location ); >+ return ( $biblionumber, 'available', undef, $location, $itemcallnumber ); > } > } > >-- >2.32.0
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 28238
:
120242
|
121399
|
126909
|
126947
|
126948
|
127130
|
127131
|
127132
|
127478
|
129489
| 129490 |
129491