From: Jason Boyer Date: Sun, 5 Mar 2023 23:47:16 +0000 (-0500) Subject: LP1848398: Stop Using Deprecated Format Settings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ab674967d14b32233447a34baa877cf20d2c9960;p=working%2FEvergreen.git LP1848398: Stop Using Deprecated Format Settings 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 --- diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/resolver.service.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/resolver.service.ts index 8c2ffcd22b..25b796234e 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/resolver.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/resolver.service.ts @@ -120,7 +120,7 @@ export class PatronResolver implements Resolve> { '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', diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 35b2765639..4997a6f5d2 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -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 index 0000000000..7da31237c6 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.really-reprecate-format-date.sql @@ -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; diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js index bebbded5af..5abb70de4e 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js @@ -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', diff --git a/Open-ILS/web/js/ui/default/staff/offline.js b/Open-ILS/web/js/ui/default/staff/offline.js index f31cc6324e..0523d52699 100644 --- a/Open-ILS/web/js/ui/default/staff/offline.js +++ b/Open-ILS/web/js/ui/default/staff/offline.js @@ -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) : diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index e3b4f62396..496e1cce6e 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -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 index 0000000000..a29057fb4a --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Administration/format_setting_deprecated.adoc @@ -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. +