LP#1817332 Add example to lib.timezone setting description
authorRemington Steed <rjs7@calvin.edu>
Thu, 21 Feb 2019 19:54:19 +0000 (14:54 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 24 May 2019 19:01:09 +0000 (15:01 -0400)
This commit adds a few examples of acceptable lib.timezone values to the
setting description, with the goal of using examples of existing
Evergreen installations. It also includes a clickable link to the
extensive list on Wikipedia. Since the settings editor is displayed
within an iframe, the link needs a "target" to successfully trigger.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.update_timezone_OUS_description.sql [new file with mode: 0644]

index 7e76891..ea97a5b 100644 (file)
@@ -17494,7 +17494,10 @@ INSERT into config.org_unit_setting_type
         'Library time zone',
         'coust', 'label'),
     oils_i18n_gettext('lib.timezone',
-        'Define the time zone in which a library physically resides',
+        'Define the time zone in which a library physically resides. Examples: America/Toronto, ' ||
+        'America/Chicago, America/Denver, America/Vancouver, Europe/Prague. See Wikipedia for a ' ||
+        '<a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="_blank">complete list</a> ' ||
+        '(Note: Only use "canonical" timezones).',
         'coust', 'description'),
     'string');
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.update_timezone_OUS_description.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.update_timezone_OUS_description.sql
new file mode 100644 (file)
index 0000000..a5e46a3
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE config.org_unit_setting_type
+    SET description =
+'Define the time zone in which a library physically resides. Examples: America/Toronto, ' ||
+'America/Chicago, America/Denver, America/Vancouver, Europe/Prague. See Wikipedia for a ' ||
+'<a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="_blank">complete list</a> ' ||
+'(Note: Only use "canonical" timezones).'
+    WHERE name = 'lib.timezone';
+
+COMMIT;
+
+