Page 1 of 1

[VUE 2] DST Adjustment issue?

Posted: Fri Feb 03, 2023 2:32 pm
by Softhouse

Hi!
We enabled the adjustDurationToDST feature in the project configuration.
But have noticed some strange behavior.

When first loading up the application and moving an event. All other events located over a DST time will be adjusted.
This seems like strange behavior as moving any event will always trigger an adjustment of the events located on DST times.

I have attached a simple example where we reproduce the issue.

Steps:
Drag "Test blocker 3" to a different date.

Result:
"Test blocker 1" and "Test blocker 2" will have their end dates adjusted.

Using Bryntum 5.2.9 in the test.


Re: [VUE 2] DST Adjustment issue?

Posted: Fri Feb 03, 2023 8:59 pm
by marcio

Hey Softhouse,

I'm getting a translation error

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'plural')

Perhaps there is a missing localization file in the test that you shared??


Re: [VUE 2] DST Adjustment issue?

Posted: Mon Feb 06, 2023 9:50 am
by Softhouse

I'm not getting that issue when I'm running the app.
Could it be that you are missing the "sv-SE" locale for the DateHelper in PlanScheduler?


Re: [VUE 2] DST Adjustment issue?

Posted: Mon Feb 06, 2023 8:06 pm
by marcio

I see, but using that application that you shared didn't trigger any strange behavior (like changing the end date). Could you confirm that I'm trying to reproduce the bug in the right way??


Re: [VUE 2] DST Adjustment issue?

Posted: Wed Feb 08, 2023 1:52 pm
by Softhouse

It looks like you are doing it in the way to reproduce the issue.
You should check the dates on the two top events after moving the bottom event.
They are only shortened by 1h, so it could be that it doesn't show. When you hovered over the events they only displayed year and date.

I attached a clip when I reproduced it using my example.


Re: [VUE 2] DST Adjustment issue?

Posted: Thu Feb 09, 2023 3:24 pm
by marcio

Thanks Softhouse,

I created a ticket to investigate/fix that behavior - https://github.com/bryntum/support/issues/6142


Re: [VUE 2] DST Adjustment issue?

Posted: Fri Feb 10, 2023 12:59 pm
by nickolay

@Softhouse Thank you for the report. We'll be investigating this issue.

Right now, as a workaround, you can make sure you provide the "duration" field for your events:

  eventStore: {
    modelClass: NPTEventModel,
    data: [
      {
        id: "969ffae2-6f5b-4f33-b9bd-77af543a8d8e",
        startDate: "2023-03-19T23:00:00.000Z",
        endDate: "2023-03-26T23:00:00.000Z",
        "duration": 7,
        task: "Test Blocker 1",
        workcenter: "DC0A"
      },
      {
        id: "969ffae2-6f5b-4f33-b9bd-77af543a8d00",
        startDate: "2023-03-19T23:00:00.000Z",
        endDate: "2023-03-26T23:00:00.000Z",
        "duration" : 7,
        task: "Test Blocker 2",
        workcenter: "DC1A"
      },
      {
        id: "969ffae2-6f5b-4f33-b9bd-77af543a8d01",
        startDate: "2023-03-19T23:00:00.000Z",
        endDate: "2023-03-24T23:00:00.000Z",
        "duration" : 5,
        task: "Test Blocker 3",
        workcenter: "DC2A"
      }
    ]
  },

Having a duration, the end date of the event's will be adjusted according to the adjustDurationToDST config and won't be changing.


Re: [VUE 2] DST Adjustment issue?

Posted: Fri Feb 10, 2023 3:03 pm
by nickolay

Turned out, one of the code-paths weren't using the adjustDurationToDST config, should be fixed now.