LP1848398: Stop Using Deprecated Format Settings user/jboyer/lp1848398_fare_thee_well_format
authorJason Boyer <JBoyer@equinoxOLI.org>
Sun, 5 Mar 2023 23:47:16 +0000 (18:47 -0500)
committerJason Boyer <JBoyer@equinoxOLI.org>
Sun, 5 Mar 2023 23:47:16 +0000 (18:47 -0500)
The deprecated format.date and format.time settings are definitely marked as
such and are now no longer used by the staff client at all. They are not
automatically removed but may be removed by admins at any time if they are not
used in local customizations.

Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/resolver.service.ts
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.really-reprecate-format-date.sql [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
Open-ILS/web/js/ui/default/staff/offline.js
Open-ILS/web/js/ui/default/staff/services/ui.js
docs/RELEASE_NOTES_NEXT/Administration/format_setting_deprecated.adoc [new file with mode: 0644]

index 8c2ffcd..25b7962 100644 (file)
@@ -120,7 +120,7 @@ export class PatronResolver implements Resolve<Promise<any[]>> {
           'ui.patron.edit.au.guardian.show',
           'ui.patron.edit.au.guardian.suggest',
           'ui.patron.edit.guardian_required_for_juv',
-          'format.date',
+          'webstaff.format.dates',
           'ui.patron.edit.default_suggested',
           'opac.barcode_regex',
           'opac.username_regex',
index 35b2765..4997a6f 100644 (file)
@@ -4497,24 +4497,6 @@ INSERT into config.org_unit_setting_type
         'coust', 'description'),
     'string', null)
 
-,( 'format.date', 'gui',
-    oils_i18n_gettext('format.date',
-        'Format Dates with this pattern.',
-        'coust', 'label'),
-    oils_i18n_gettext('format.date',
-        'Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010")',
-        'coust', 'description'),
-    'string', null)
-
-,( 'format.time', 'gui',
-    oils_i18n_gettext('format.time',
-        'Format Times with this pattern.',
-        'coust', 'label'),
-    oils_i18n_gettext('format.time',
-        'Format Times with this pattern (examples: "h:m:s.SSS a z" for "2:07:20.666 PM Eastern Daylight Time", "HH:mm" for "14:07")',
-        'coust', 'description'),
-    'string', null)
-
 ,( 'global.default_locale', 'glob',
     oils_i18n_gettext('global.default_locale',
         'Global Default Locale',
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.really-reprecate-format-date.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.really-reprecate-format-date.sql
new file mode 100644 (file)
index 0000000..7da3123
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); -- JBoyer
+
+-- If these settings have not been marked Deprecated go ahead and do so now
+UPDATE config.org_unit_setting_type SET label = 'Deprecated: ' || label WHERE name IN ('format.date', 'format.time') AND NOT label ILIKE 'deprecated: %';
+
+COMMIT;
index bebbded..5abb70d 100644 (file)
@@ -409,7 +409,7 @@ angular.module('egCoreMod')
             'ui.patron.edit.au.guardian.show',
             'ui.patron.edit.au.guardian.suggest',
             'ui.patron.edit.guardian_required_for_juv',
-            'format.date',
+            'webstaff.format.dates',
             'ui.patron.edit.default_suggested',
             'opac.barcode_regex',
             'opac.username_regex',
index f31cc63..0523d52 100644 (file)
@@ -605,8 +605,8 @@ function($routeProvider , $locationProvider , $compileProvider) {
                     if (blocked) {
                         egCore.audio.play('warning.offline.blocked_patron');
                         var default_format = 'mediumDate';
-                        egCore.org.settings(['format.date']).then(function(set) {
-                            if (set && set['format.date']) default_format = set['format.date'];
+                        egCore.org.settings(['webstaff.format.dates']).then(function(set) {
+                            if (set && set['format.date']) default_format = set['webstaff.format.dates'];
                             $scope.date_format = default_format;
                             var fBlockListDate = $scope.blockListDate ?
                                 $filter('date')(($scope.blockListDate * 1000), $scope.date_format) :
index e3b4f62..496e1cc 100644 (file)
@@ -1383,8 +1383,8 @@ https://stackoverflow.com/questions/24764802/angular-js-automatically-focus-inpu
                     scope.showTimePicker = true;
 
                 var default_format = 'mediumDate';
-                egCore.org.settings(['format.date']).then(function(set) {
-                    if (set) default_format = set['format.date'];
+                egCore.org.settings(['webstaff.format.dates']).then(function(set) {
+                    if (set) default_format = set['webstaff.format.dates'];
                     scope.date_format = (scope.dateFormat) ?
                         scope.dateFormat :
                         default_format;
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/format_setting_deprecated.adoc b/docs/RELEASE_NOTES_NEXT/Administration/format_setting_deprecated.adoc
new file mode 100644 (file)
index 0000000..a29057f
--- /dev/null
@@ -0,0 +1,6 @@
+== Date / Time Format Settings Deprecated ==
+
+The format.date and format.time org unit settings are no longer used by the staff client
+and have been marked Deprecated. If you are not using these OU settings in a local customization
+they can be removed from the database at your convenience.
+