Details
-
Bug
-
Status: Closed (View Workflow)
-
P1
-
Resolution: Done
-
None
-
Prokopovych - Sprint 117, Prokopovych - Sprint 118, Prokopovych - Sprint 119
-
Prokopovych
-
R3 2021
Description
Overview: UI modules do not supply ISO-8601 dates if the tenant-locale is ar (Arabic).
Details: As noted on Slack, UI apps supply Eastern Arabic numerals in API requests when the tenant API is set to ar.
Steps to Reproduce:
- Log into folio-snapshot as a user with permission to (a) check out items and (b) use developer tools to change the session locale
- Visit Settings > Developer > Session locale and change the session locale to Arabic
- Visit Check out and attempt to charge any item to any active user
Expected Results: Successful check out
Actual Results: Failed checkout due to a 500 from circulation/check-out-by-barcode because of incorrect data in the loanDate field of the POST body:
POST /circulation/check-out-by-barcode { "itemBarcode":"b612", "userBarcode":"789", "servicePointId":"7c5abc9f-f3d7-4856-b8d7-6712462ca007", "loanDate":"٢٠٢١-٠٦-١٦T١٣:٣٠:٢٦Z", "id":"02b850d2-9a7b-4ece-b352-43d8a23b90c1" } Invalid format: "٢٠٢١-Ù Ù¦-١٦T١٣:Ù£Ù :٢٦Z" java.lang.IllegalArgumentException: Invalid format: "٢٠٢١-Ù Ù¦-١٦T١٣:Ù£Ù :٢٦Z" at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:945) at org.joda.time.DateTime.parse(DateTime.java:160) at org.joda.time.DateTime.parse(DateTime.java:149) at org.folio.circulation.support.json.JsonPropertyFetcher.getDateTimeProperty(JsonPropertyFetcher.java:92) at org.folio.circulation.support.json.JsonPropertyFetcher.getDateTimeProperty(JsonPropertyFetcher.java:85) at org.folio.circulation.domain.Loan.getLoanDate(Loan.java:247) at org.folio.circulation.resources.CheckOutByBarcodeResource.checkOut(CheckOutByBarcodeResource.java:215) at org.folio.circulation.resources.CheckOutByBarcodeResource.lambda$checkOut$12(CheckOutByBarcodeResource.java:133) at org.folio.circulation.support.results.Result.after(Result.java:252) at org.folio.circulation.resources.CheckOutByBarcodeResource.lambda$checkOut$13(CheckOutByBarcodeResource.java:133) at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072) at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
It isn't clear if this is a problem with how
- moment is configured in src/loginServices, in which case it's an STCOR bug
- timestamps are created in individual apps, e.g. loanDate: moment().utc().format(), in which case it's a per-app bug and we need to file separate tickets for every instance of moment()...format()
- both
CC: ostephens
TestRail: Results
Attachments
Issue Links
- relates to
-
STCOR-555 export available numbering systems
-
- Closed
-
-
UICHKIN-272 return dates must be ISO-8601 formatted
-
- Closed
-
-
UICHKOUT-732 loan-date must be ISO-8601 formatted
-
- Closed
-
-
UITEN-181 Set numbering system independent of locale
-
- Closed
-
-
STCOM-860 Datepicker should always return Arabic digits given props.backendDateStandard
-
- Closed
-
-
UID-89 allow users to set numbering system independently of locale
-
- Closed
-