[UICAL-176] Calendar hours displayed off by one day in Regular hours Edit view Created: 02/Nov/21  Updated: 24/Feb/22  Resolved: 02/Dec/21

Status: Closed
Project: ui-calendar
Components: None
Affects versions: None
Fix versions: 7.1.0

Type: Bug Priority: P2
Reporter: Lisa Sjögren Assignee: Pavel Spichonak
Resolution: Done Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: File Calendar hours offset by one day in Regular hours edit mode.mp4     GIF File Evidence-UICAL-176-ex.gif     GIF File Evidence-UICAL-176.gif     PNG File Screen Shot 2021-11-17 at 2.27.24 PM.png     PNG File Screen Shot 2021-11-17 at 2.27.51 PM.png     PNG File image-2021-11-17-16-19-34-962.png     PNG File screenshot-1.png     PNG File screenshot-2.png     PNG File screenshot-3.png    
Issue links:
Defines
defines UXPROD-3409 Vega - Lotus Enhancements/Bugfixes/T... Closed
Gantt End to Start
has to be done after UICAL-189 Spike: Investigate cause of the issue... Closed
Sprint: EPAM-Veg Sprint 128
Story Points: 0.5
Development Team: Vega
Release: Lotus R1 2022
Affected Institution:
!!!ALL!!!
Tester Assignee: Cheryl Malmborg

 Description   

Overview:

Calendar hours displayed offset by one day in Regular hours Edit view. This makes editing the regular hours very confusing.

Steps to Reproduce:

  1. Log into https://folio-snapshot.dev.folio.org/ (2021-11-02)
  2. Go to Settings > Calendar > Opening hours
  3. Select a service point
  4. Click New to add Regular Library Hours
  5. Create a new opening hour period. Let's say the library is open Monday-Friday – add these times to the calendar.
  6. Click Close & save
  7. Click the Edit pen to open the calendar in Edit mode

Expected Results: The calendar is displayed with the opening days and hours you specified.

Actual Results:
The calendar is displayed with the opening days and hours you specified offset by one day. I.e. the library is now open from Tuesday-Saturday.

Additional Information:

Whenever, in the edit mode, you Click Save & Close, the hours displayed are saved to FOLIO. So it's not that a correct days is displayed incorrectly, but what you see is what you save.

I have so far observed this in tenants with language & locale British English/London, and British English/Windhoek. I have not been able to reproduce in English (US)/New York or English (Sweden)/Stockholm.

Interested parties: NUST



 Comments   
Comment by Anya [ 02/Nov/21 ]

Sharon Wiles-Young please be aware. 

Comment by Noah Overcash [ 02/Nov/21 ]

It looks like this is an issue with https://github.com/folio-org/ui-calendar/blob/master/src/settings/OpeningPeriodForm/BigCalendarWrapper.js#L42 not being localized and always assuming that the leftmost day is Sunday (therefore Monday goes second from left, despite the fact that the calendar itself is localized, resulting in it being projected off-by-one).

Comment by Noah Overcash [ 02/Nov/21 ]

Proposed fix: https://github.com/folio-org/ui-calendar/pull/356

Comment by Stanislau Snapok [ 08/Nov/21 ]

Hello Anya, Noah Overcash!

I tried to reproduce this bug and failed. Could you please give more info such as your time zone, first day of the week and anything else that you find useful to reproduce the bug.

Thanks!

Comment by Lisa Sjögren [ 08/Nov/21 ]

Stanislau Snapok Did you try these settings?

Locale British English & timezone London
Locale British English & timezone Windhoek

Comment by Stanislau Snapok [ 08/Nov/21 ]

Lisa Sjögren thank you! I'll try, and come back with the result.

Comment by Stanislau Snapok [ 09/Nov/21 ]

Finaly I able to reproduce the bug on the snapshot env.

Noah Overcash, also I should admit that with your fix it still reproducable for me.

Comment by Noah Overcash [ 09/Nov/21 ]

Stanislau Snapok hmm, I can't seem to reproduce the original anymore now, even on a fresh snapshot env.  I've got the config entries set up for locale/timezone and I can't get a week starting on Monday anymore, so I probably just thought my fix worked from some accidental reversion of timezone settings.  How were you able to reproduce it?

Comment by Stanislau Snapok [ 10/Nov/21 ]

Noah Overcash that was a little chalange for us. To reproduce the bug you should go to settings -> developer -> user local -> locale and set it to "British English" for example for your test user. Than you should log out and log in with your test user.

Comment by Anya [ 15/Nov/21 ]

Support: Stephanie Buck making you aware of this ticket. 

Comment by Stephanie Buck [ 15/Nov/21 ]

Noah Overcash and Stanislau Snapok can we get and update on this ticket? The status is open, but I see there has been a pull request, it's assigned to Vega but I missed this somehow. Who is doing the work on this? Thank you!

Comment by Stanislau Snapok [ 15/Nov/21 ]

Stephanie Buck, you missed this because the dev team was added few hours ago, as well as "releas" and "label" bugfest_R3.2021.
You are right, there was a PR for this bug, but it didn't solve the problem, as you can see in comments above.
Our team didn't work at this bug, we just reviewed PR from our community and discussed results here.
But now, as dev team and releas lable have been assigned, I believe we will start work asap.

cc: Dmitriy Litvinenko

Comment by Stephanie Buck [ 15/Nov/21 ]

Thanks, Stanislau Snapok

Anya & support, since this wasn't initially labeled from Bug fest and assigned to Vega, it wasn't worked on in time for last week's bug fix deadline. We'll do our best, but it likely won't be in Kiwi. 

cc: Noah Overcash

Comment by Anya [ 15/Nov/21 ]

Thanks Stephanie Buck  

Comment by Anya [ 16/Nov/21 ]

at the bequest of Oleksii Petrenko I have changed this to lotus R1 2022

Comment by Alina Dorosh [ 18/Nov/21 ]

When Pavel Spichonak investigated UICAL-189 several related bugs were found.
Below are the steps to reproduce on the Snapshot env.

 

  •  If user select British local that for Service point first day of the week must start "Mon" to preview the service point.

Preconditions:
1. "Regular Library Hours Validity Period" for " Online" created
2. British local in "Locale (for language display, date format etc.)"  selected 

Steps to reproduce: 
1.Open Calendar app
2. Select Online service point 
3. Pa attention on the first day of the week

Actual result: First day of the the week starts "Sun"
Expected result: First day of the week starts "Mon" for British local

Notice: evidence have been added.

 

  • If user select British local that for Service point first day of the week must start "Mon" for "Exceptions period"

Preconditions:
1. British local in "Locale (for language display, date format etc.)"  selected 
2. Calendar app is opened
3. "Open calendar to add exceptions" is clicked

Steps to reproduce:
1. Select "Online" service point
2. Observe result

Actual result: First day of the the week starts "Sun" on the "Exceptions period"
Expected result: First day of the the week starts "Mon" on the "Exceptions period"
 
Notice: evidence have been added.

  •  First day of the the week starts "Mon" on the "Regular Library Hours Validity Period" if user select British local

Preconditions:
1. Calendar app is opened
2. "Regular Library Hours Validity Period" for Online created
3. British local in "Locale (for language display, date format etc.)"  selected 
4. "Regular Library Hours Validity Period" for Online created

Steps to reproduce:
1. Click on the Valid from date picker
2. Add  library hours for any day in the calendar
3. Observe result

Actual result: First day of the the week starts "Sun" on the "Regular Library Hours Validity Period"
Expected result: First day of the the week starts "Mon" on the "Regular Library Hours Validity Period"
 
Notice: evidence have been added.
 

Comment by Alina Dorosh [ 23/Nov/21 ]

Hello Cheryl Malmborg!

Work as expected on the Snapshot env.

Comment by Dmitriy Litvinenko [ 02/Dec/21 ]

Hello Cheryl Malmborg

Could you please review on the Snapshot env?

Comment by Cheryl Malmborg [ 02/Dec/21 ]

Dmitriy Litvinenko Tested on snapshot 12/2/2021. It is working as expected.

Generated at Thu Feb 08 22:22:08 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.