Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing shifts starting at midnight uses wrong date #1450

Closed
lukasrad02 opened this issue Dec 15, 2024 · 0 comments · Fixed by #1451
Closed

Editing shifts starting at midnight uses wrong date #1450

lukasrad02 opened this issue Dec 15, 2024 · 0 comments · Fixed by #1451
Labels
[C] bug Something isn't working

Comments

@lukasrad02
Copy link
Contributor

Describe the bug

When a shift that starts ad midnight on day X is edited, the date form field is prefilled with date X-1 and saved like this. Hence, editing some other property of such a shift also alters the date.

To Reproduce

Steps to reproduce the behavior:

  1. Create an event with a single shift starting on day X at midnight (12 am) and ending at, for example, 1 am.
  2. Save the event and shift. Check that the event date and shift date displayed on the event's page are equal to date X.
  3. Edit the shift. Notice that the date field shows X-1.
  4. Save the shift without making any changes.
  5. The shift (and thus the event) have now moved to date X-1, as can be seen on the event's page

Expected behavior

When editing a shift, the form should be prefilled with the correct current values of the shift so that the only changes that will be applied to the shift are those the user explicitly entered into the form.

Environment

Tested with Ephios v0.17.2 as well as the latest commit on main (9be8059). Bug occurs independent from the browser used (tested with Firefox and Chromium).

Additional context

Might be related to #515

@lukasrad02 lukasrad02 added the [C] bug Something isn't working label Dec 15, 2024
@lukasrad02 lukasrad02 changed the title Editing shifts starting ad midnight uses wrong date Editing shifts starting at midnight uses wrong date Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant