UI fee/fine date/time token previews are hard-coded

Description

Overview: In UICIRC-479, date-related tokens were renamed to make sure their values are formatted according to the tenant's locale but the `previewValue` strings all use hard-coded dates, e.g. `Jun 30, 2020 11:00`.

Steps to Reproduce:

  1. Log into folio-snapshot as diku_admin

  2. visit Settings > Developer > Session locale

  3. choose a locale with a date-format different that English - US

  4. visit Settings > Circulation > Patron notice templates

  5. click +New to create a new template

  6. In the Body section, click {} to add tokens

  7. choose feeCharge.date then click Add token

  8. click the Preview button

Expected Results:
Preview date will be formatted according to current locale

Actual Results:
Preview date uses the hard-coded value Jun 30, 2020

Interested parties:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

2

Checklist

hide

TestRail: Results

Activity

Show:

Holly MistlebauerDecember 15, 2021 at 8:58 PM

Thanks much!

Alina DoroshDecember 15, 2021 at 8:07 AM
Edited

Hello !

Work as expected on Snapshot env.

Evidence have been added.

 

During retesting, another bug  ( ) was found that is not related to this ticket.

Zak BurkeDecember 9, 2021 at 1:25 PM

, I filed the issue but set the priority just a few days ago so you will have to talk to her about that.

P2 feels high to me, but for folks outside the US I can imagine that seeing dates styled for en-us when that's not your locale could be jarring. Maybe it's a "confidence in the system" thing, i.e. even though it's a small problem it's also an "immediately and obviously wrong" problem, like a typo, that suggests a lack of attention to detail.

I don't know where the easiest fix is for this, but I feel like it should be possible to pull in useIntl or injectIntl from react-intl to get the intl object and pass that around as necessary to localize values before they become props for the template-preview handler.

Stephanie BuckDecember 9, 2021 at 1:10 PM

, this bug has been hanging around a while. Is it still a P2?

Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Vega

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created June 25, 2020 at 10:44 AM
Updated February 24, 2022 at 11:26 AM
Resolved December 15, 2021 at 8:58 PM
TestRail: Cases
TestRail: Runs