[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 9cb39ee97bea0fd133b439a0695c17109caf403f
Evergreen Git
git at git.evergreen-ils.org
Wed Nov 8 10:48:34 EST 2017
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_0 has been updated
via 9cb39ee97bea0fd133b439a0695c17109caf403f (commit)
from 56c500fc119b8dc663048b61ff6503ec6622ac9d (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 9cb39ee97bea0fd133b439a0695c17109caf403f
Author: Chris Sharp <csharp at georgialibraries.org>
Date: Tue Nov 7 15:41:26 2017 -0500
LP#1724885 - Alert when TCN value already exists on bib import.
To test
-------
[1] Ensure that the global flag 'cat.bib.use_id_for_tcn' is off.
[2] Import a record via Z39.50 in the web staff client.
[3] Repeat the Z39.50 search and attempt to import the record again.
Note that the import will fail silently (with error messages
in the browser console).
[4] Apply the patch and repeat step 3. This time, an alert modal
will appear pointing out that the TCN is already in use.
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2
index 7be4638..bfecba8 100644
--- a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2
+++ b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2
@@ -2,6 +2,8 @@
<script>
angular.module('egCoreMod').run(['egStrings', function(s) {
+ s.TCN_EXISTS = "[% l('A record already exists with the requested TCN value') %]";
+ s.TCN_EXISTS_ERR = "[% l('An unexpected error occurred') %]";
s.IMPORTED_RECORD_FROM_Z3950 = "[% l('Imported record') %]";
s.IMPORTED_RECORD_FROM_Z3950_AS_ID = "[% l('Record imported as ID [_1]', '{{id}}') %]";
s.GO_TO_RECORD = "[% l('Go to record') %]";
diff --git a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
index b6be459..e3583d1 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
@@ -27,9 +27,9 @@ angular.module('egCatZ3950Search',
*/
.controller('Z3950SearchCtrl',
['$scope','$q','$location','$timeout','$window','egCore','egGridDataProvider','egZ3950TargetSvc','$uibModal',
- 'egConfirmDialog',
+ 'egConfirmDialog','egAlertDialog',
function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvider, egZ3950TargetSvc, $uibModal,
- egConfirmDialog) {
+ egConfirmDialog, egAlertDialog) {
// get list of targets
egZ3950TargetSvc.loadTargets();
@@ -227,6 +227,17 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi
function() { deferred.resolve() },
null, // onerror
function(result) {
+ var evt = egCore.evt.parse(result);
+ if (evt) {
+ if (evt.textcode == 'TCN_EXISTS') {
+ egAlertDialog.open(
+ egCore.strings.TCN_EXISTS
+ );
+ } else {
+ // we shouldn't get here
+ egAlertDialog.open(egCore.strings.TCN_EXISTS_ERR);
+ }
+ } else {
egConfirmDialog.open(
egCore.strings.IMPORTED_RECORD_FROM_Z3950,
egCore.strings.IMPORTED_RECORD_FROM_Z3950_AS_ID,
@@ -238,6 +249,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi
// for some reason
$window.location.href = egCore.env.basePath + 'cat/catalog/record/' + result.id();
});
+ }
}
);
-----------------------------------------------------------------------
Summary of changes:
.../templates/staff/cat/share/z3950_strings.tt2 | 2 ++
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js | 16 ++++++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list