Our pure JavaScript Scheduler component


Post 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.

Attachments
DST Time djustment test.zip
(353.61 KiB) Downloaded 17 times

Post 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??

Best regards,
Márcio


Post 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?


Post 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??

Attachments
Vue App - 6 February 2023.mp4
(294.28 KiB) Downloaded 17 times

Best regards,
Márcio


Post 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.

Attachments
Vue App - Google Chrome 2023-02-08 12-49-10.mp4
(26.83 MiB) Downloaded 20 times

Post by marcio »

Thanks Softhouse,

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

Best regards,
Márcio


Post 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.


Post by nickolay »

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


Post Reply