Constrain inputs for lib.timezone settings to valid tzdata names

Bug #1754364 reported by Galen Charlton
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Inspired by bug 1752753, it would be nice if the library settings editor presented a list of valid timezone names for the user to choose from when setting the lib.timezone org unit setting.

(This would probably be part of a larger, hypothetical project to make a new Angular library settings editor be smarter and more usable.)

Evergreen master

Revision history for this message
Mike Rylander (mrylander) wrote :

Note: we have the list of available timezones in JS via moment.tz.names(), which returns an array of known, valid timezone names.

Revision history for this message
Remington Steed (rjs7) wrote :

I'm adding documentation tags, since we should at least give people a clue of the input format in the setting name or description, and the docs. (I found myself guessing at "EST", or "-5:00"...).

Maybe we could point people to Wikipedia for now:

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

tags: added: bitesize-doc documentation
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Remington Steed (rjs7) wrote :

I've opened a new bug for the documentation aspects of this:

bug 1817332

Remington Steed (rjs7)
tags: removed: bitesize-doc documentation
tags: added: orgunitsettings usability
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Noting that you can get an array of supported values in vanilla JS using Intl.supportedValuesOf('timeZone')

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Ugh, but Intl.supportedValuesOf('timeZone') is not supported in typescript < 5.1. Maybe that approach will have to wait for Angular 17 or so.

tags: added: ux-form-validation
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Here is a branch: collab/sandbergja/lp1754364-timezone-dropdown

This started in the New Devs Working Group May meeting, and I finished it up.

Here is a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/sandbergja/lp1754364-timezone-dropdown

To test:
1. Go to Admin > Local Administration > Library Settings Editor
2. Find the Timezone setting in the list of settings
3. Confirm that the timezone select is a typeahead that autocompletes
any valid timezone

tags: added: pullrequest
Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
milestone: none → 3.12-beta
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Force-pushed this branch to rebase against today's main.

Revision history for this message
Chris Sharp (chrissharp123) wrote :

Works for me! Pushed to main. Thanks Jane and the New Devs Working Group!

Changed in evergreen:
assignee: nobody → Chris Sharp (chrissharp123)
Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Chris Sharp (chrissharp123) → nobody
tags: added: signedoff
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.