<item name='renew' value='true'/>
<item name='renew all' value='false'/>
</supports>
-
+ <options>
+ <!-- msg64, the patron information request can be
+ made to return item barcodes by setting
+ the option 'msg64_summary_datatype' to 'barcode'
+ as below. Any other value, or no value at all
+ will cause OpenILS::SIP to return the title
+ in response to a message 64 request, which was the
+ default behaviour in previous versions of Evergreen.
+ -->
+ <option name='msg64_summary_datatype' value='barcode' />
+ </option>
<scripts>
<path>/openils/var/</path>
<path>/openils/var/catalog/</path>
my @o;
syslog('LOG_DEBUG', "OILS: overdue_items() fleshing circs @overdues");
+
+
+ my @return_datatype = grep { $_->{name} eq 'msg64_summary_datatype' } @{$self->{config}->{implementation_config}->{options}->{option}};
+
for my $circid (@overdues) {
next unless $circid;
- push( @o, __circ_to_title($self->{editor}, $circid) );
+ if(@return_datatype and $return_datatype[0]->{value} eq 'barcode') {
+ push( @o, __circ_to_barcode($self->{editor}, $circid));
+ } else {
+ push( @o, __circ_to_title($self->{editor}, $circid));
+ }
}
@overdues = @o;
[ $overdues[($start-1)..($end-1)] ] : \@overdues;
}
+sub __circ_to_barcode {
+ my ($e, $circ) = @_;
+ return unless $circ;
+ $circ = $e->retrieve_action_circulation($circ);
+ my $copy = $e->retrieve_asset_copy($circ->target_copy);
+ return $copy->barcode;
+}
+
sub __circ_to_title {
my( $e, $circ ) = @_;
return unless $circ;
my @c;
syslog('LOG_DEBUG', "OILS: charged_items() fleshing circs @charges");
+
+ my @return_datatype = grep { $_->{name} eq 'msg64_summary_datatype' } @{$self->{config}->{implementation_config}->{options}->{option}};
+
for my $circid (@charges) {
next unless $circid;
- push( @c, __circ_to_title($self->{editor}, $circid) );
+ if(@return_datatype and $return_datatype[0]->{value} eq 'barcode') {
+ push( @c, __circ_to_barcode($self->{editor}, $circid));
+ } else {
+ push( @c, __circ_to_title($self->{editor}, $circid));
+ }
}
+
@charges = @c;
return (defined $start and defined $end) ?