[open-ils-commits] [GIT] Evergreen ILS branch master updated. 43405971832887b5cbe75b6eb2421dd1b09a1baf

Evergreen Git git at git.evergreen-ils.org
Tue Feb 5 15:41:35 EST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  43405971832887b5cbe75b6eb2421dd1b09a1baf (commit)
       via  20a7f91f7ab83d23613fe98228b3f7546f6daa10 (commit)
      from  7e2483bbc00bb1cabb154fd974aa950690283c44 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 43405971832887b5cbe75b6eb2421dd1b09a1baf
Author: Jason Stephenson <jason at sigio.com>
Date:   Tue Feb 5 15:35:53 2019 -0500

    Lp 1805897: Add Release Note
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/docs/RELEASE_NOTES_NEXT/Administration/marc-export-copy-status.adoc b/docs/RELEASE_NOTES_NEXT/Administration/marc-export-copy-status.adoc
new file mode 100644
index 0000000..7c7d287
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Administration/marc-export-copy-status.adoc
@@ -0,0 +1,3 @@
+Include Item Status in marc_export Items Export
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The marc_export program now includes the item status in the 852 subfield s when exporting items.

commit 20a7f91f7ab83d23613fe98228b3f7546f6daa10
Author: Rogan Hamby <rogan.hamby at gmail.com>
Date:   Thu Nov 29 15:19:43 2018 -0500

    Lp 1805897: Add Item Status to the Holdings of marc_export.in
    
    Export status in the 852 subfield s when exporting items.
    
    Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
    Signed-off-by: John Yorio <jyorio at equinoxinitiative.org>
    Signed-off-by: Steve Callender <stevecallender at equinoxinitiative.org>
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/Open-ILS/src/support-scripts/marc_export.in b/Open-ILS/src/support-scripts/marc_export.in
index 4031874..843ddff 100755
--- a/Open-ILS/src/support-scripts/marc_export.in
+++ b/Open-ILS/src/support-scripts/marc_export.in
@@ -532,6 +532,7 @@ sub next {
                         my $price = ($acp->price() ? $Marque::config->option_value('money').$acp->price() : '');
                         my $prefix = $acp->call_number()->prefix()->label();
                         my $suffix = $acp->call_number()->suffix()->label();
+                        my $status = $acp->status()->name();
                         eval {
                             local $SIG{__WARN__} = sub {
                                 my $message = "Warning from bibliographic record " . $r->id() . ": "
@@ -550,6 +551,7 @@ sub next {
                                 ($suffix ? (m => Encode::decode_utf8($suffix)) : ()),
                                 ($acp->circ_modifier() ? (g => Encode::decode_utf8($acp->circ_modifier())) : ()),
                                 p => Encode::decode_utf8($acp->barcode()),
+                                s => Encode::decode_utf8($status),
                                 ($price ? (y => Encode::decode_utf8($price)) : ()),
                                 ($acp->copy_number() ? (t => $acp->copy_number()) : ()),
                                 ($U->is_true($acp->ref()) ? (x => 'reference') : ()),
@@ -663,6 +665,24 @@ sub shelves {
     return @{$self->{shelves}};
 }
 
+# Returns an array of ccs objects.
+sub statuses {
+    my $self = shift;
+
+    unless ($self->{statuses} && @{$self->{statuses}}) {
+        my $fmClass = Fieldmapper::class_for_hint('ccs');
+        my @classFields = $fmClass->real_fields();
+        my $classTable = $fmClass->Table();
+        my $query = 'select ' . join(',', @classFields);
+        $query .= "\nfrom $classTable";
+        my $result = $self->{handle}->selectall_arrayref($query, {Slice=>{}});
+        my @statuses = map {$fmClass->from_bare_hash($_)} @{$result};
+        $self->{statuses} = \@statuses;
+    }
+
+    return @{$self->{statuses}};
+}
+
 # Returns an array of acnp objects.
 sub prefixes {
     my $self = shift;
@@ -736,6 +756,7 @@ sub acps_for_bre {
     my @locations = $self->shelves();
     my @prefixes = $self->prefixes();
     my @suffixes = $self->suffixes();
+    my @statuses = $self->statuses();
 
     my @acns = $self->acns_for_bre($bre);
     if (@acns) {
@@ -752,12 +773,14 @@ sub acps_for_bre {
                 my $cn = $_->call_number();
                 my $clib = $_->circ_lib();
                 my $loc = $_->location();
+                my $stat = $_->status();
                 my ($org) = grep {$_->id() == $clib} @orgs;
                 my ($acn) = grep {$_->id() == $cn} @acns;
                 my ($location) = grep {$_->id() == $loc} @locations;
                 my $olib = $acn->owning_lib();
                 my $pre = $acn->prefix();
                 my $suf = $acn->suffix();
+                my ($ccs) = grep {$_->id() == $stat} @statuses;
                 my ($acnp) = grep {$_->id() == $pre} @prefixes;
                 my ($acns) = grep {$_->id() == $suf} @suffixes;
                 my ($owner) = grep {$_->id() == $olib} @orgs;
@@ -767,6 +790,7 @@ sub acps_for_bre {
                 $_->location($location);
                 $_->call_number->prefix($acnp);
                 $_->call_number->suffix($acns);
+                $_->status($ccs);
             }
             return @acps;
         }

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/support-scripts/marc_export.in        |   24 ++++++++++++++++++++
 .../Administration/marc-export-copy-status.adoc    |    3 ++
 2 files changed, 27 insertions(+), 0 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/marc-export-copy-status.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list