[open-ils-commits] [GIT] Evergreen ILS branch rel_3_3 updated. 8bb17b9fd93ff762b94056522af9e0ed81f0f64b

Evergreen Git git at git.evergreen-ils.org
Tue Jan 7 12:39:03 EST 2020


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, rel_3_3 has been updated
       via  8bb17b9fd93ff762b94056522af9e0ed81f0f64b (commit)
      from  34a5999bb514da792666e984f4162f417362a975 (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 8bb17b9fd93ff762b94056522af9e0ed81f0f64b
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri Dec 20 12:40:34 2019 -0500

    LP#1843599: AngularJS MARC editor once again sets bib source
    
    This patch fixes a regression introduced by the patch for bug 1693580
    that prevent changes to the bib source from being made via the AngularJS
    MARC editor.
    
    To test
    -------
    [1] Apply the patch.
    [2] Create a new bib record and save it with a non-empty source. Verify
        that the record sets the source as expected.
    [3] Edit a bib record and change the source. Verify that the new source
        is retained when the record is saved.
    [4] Edit an authority record and save it. Verify that it can be updated
        without error. (Note that authority records do not have sources in
        the same way that bib records do.)
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Rogan Hamby <rhamby at esilibrary.com>
    Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js b/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js
index 71cf44ba52..09b46d0c2e 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js
@@ -737,7 +737,8 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
 
                 // necessary to prevent ng-model scope hiding ugliness in egMarcEditBibSource:
                 $scope.bib_source = {
-                    id : $scope.bibSource ? $scope.bibSource : null
+                    id : $scope.bibSource ? $scope.bibSource : null,
+                    name: null
                 };
                 $scope.brandNewRecord = false;
                 $scope.record_type = $scope.recordType || 'bre';
@@ -1399,7 +1400,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                         promise = egCore.net.request(
                             'open-ils.cat', method,
                             egCore.auth.token(), $scope.recordId, 
-                            $scope.Record().marc(), $scope.Record().source()
+                            $scope.Record().marc(), $scope.bib_source.name
                         );
 
                     } else {
@@ -1412,7 +1413,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                             'open-ils.cat', method,
                             egCore.auth.token(), 
                             $scope.Record().marc(),
-                            $scope.Record().source()
+                            $scope.bib_source.name
                         );
                     }
 
@@ -1590,6 +1591,8 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                     function(newVal, oldVal) {
                         if (newVal !== oldVal) {
                             $scope.bre.source(newVal);
+                            var cbs = $scope.bib_sources.filter(function(s) { return s.id() == newVal });
+                            $scope.$parent.bib_source.name = (cbs && cbs[0]) ? cbs[0].source() : null;
                         }
                     }
                 );

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

Summary of changes:
 Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list