Premium support for our pure JavaScript UI components


Post by marasoft@netrom.ro »

Hello, we recently started working with dependenciesFeature in Bryntum Scheduler Pro ("@bryntum/schedulerpro": "5.6.9"). We currently save all the dependencies in the database, and the lag is not updated with the distance between the events (this is not an issue), while drag and drop events are already linked. For example, let's say we have the following situation:

events={[
            { resourceId: 1, id: '9C566138-A9E3-4E7D-8ED9-6D2F6FE524C5', name: 'Interview', startDate: '2018-05-06', endDate: '2018-05-07'},
            { resourceId: 2, id: 'CAE9068B-ABC4-448E-A5A8-B0038201FC20', name: 'Press meeting', startDate: '2018-05-10', endDate: '2018-05-11'}
          ]}
dependencies={[
            { id: 'FF76B74C-5198-4D8C-9F0B-BA3E3751C241', from: '9C566138-A9E3-4E7D-8ED9-6D2F6FE524C5', to: 'CAE9068B-ABC4-448E-A5A8-B0038201FC20', cls: 'dev-path', lag: 2, lagUnit: 'h', active: true, type: 2, fromSide: null, toSide: null }
          ]}

We expect that the events will fit from 2018-05-06 to 2018-05-07' and from '2018-05-10' to '2018-05-11'

 <BryntumSchedulerPro
          autoHeight={true}
          startDate={new Date(2018, 4, 6)}
          endDate={new Date(2018, 4, 13)}
          columns={[
            { field: 'name', text: 'Name', width: 100 }
          ]}
          resources={
            [
              { id: 1, name: 'John Doe' },
              { id: 2, name: 'Jane Doe2' }
            ]
          }
          events={[
            { resourceId: 1, id: '9C566138-A9E3-4E7D-8ED9-6D2F6FE524C5', name: 'Interview', startDate: '2018-05-06', endDate: '2018-05-07'},
            { resourceId: 2, id: 'CAE9068B-ABC4-448E-A5A8-B0038201FC20', name: 'Press meeting', startDate: '2018-05-10', endDate: '2018-05-11'}
          ]}
          features={{
            dependencies: {
              clickWidth: 15
            },

        dependencyEdit: {
          disabled: false
        }
      }}
      dependencies={[
        { id: 'FF76B74C-5198-4D8C-9F0B-BA3E3751C241', from: '9C566138-A9E3-4E7D-8ED9-6D2F6FE524C5', to: 'CAE9068B-ABC4-448E-A5A8-B0038201FC20', cls: 'dev-path', lag: 2, lagUnit: 'h', active: true, type: 2, fromSide: null, toSide: null }
      ]}
    />
scheduler_5.6.9.png
scheduler_5.6.9.png (34.35 KiB) Viewed 166 times

Here is the result of the specified schedules, automaticallyScheduled one next to each other.

More than this, we also tried the same case on your latest version https://bit.ly/bryntumSchedulerLatest
And here is the result from the latest version:

scheduler_latest_version.png
scheduler_latest_version.png (10.7 KiB) Viewed 166 times

For us, this is the perfect behavior, to prioritize the events start date and end date, and after that to place the dependencies without moving events on scheduler initial mount.

We would like to know if the same behavior (keep the events positions even if all the dependencies are active) can be achieved also in our version of Scheduler.


Post by marcio »

Hey marasoft@netrom.ro,

Thanks for reaching out.

To achieve the behavior where events maintain their positions even when dependencies are active, you can use the manuallyScheduled property for your events. This property ensures that the event's start and end dates are not automatically adjusted based on dependencies or constraints.

If this does not resolve your issue, please ensure that your Scheduler Pro configuration matches the latest version's settings that you found satisfactory. If you need further assistance, feel free to provide more details or code snippets.

Documentation reference: https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/model/EventModel#field-manuallyScheduled

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by marasoft@netrom.ro »

scheduler.gif
scheduler.gif (1000.75 KiB) Viewed 142 times

Let's say I have the following situation: the lag is not in sync with the distance between them. I save all the records created here in the database. Next time, when I open the scheduler, I expect exactly the same view: 2 events with 7 days between them and a lag of 5 hours. I want to keep the position of the events, but also add these dependencies.
Manually scheduled is not a solution because we also want to use the functionality of moving items linked.
If the above scenario is not possible:
Is there any way to completely disable the lag and keep only the functionality of scheduling one item before another (also move them together when they are linked)?


Post by marcio »

Hey marasoft@netrom.ro,

Sorry, I didn't get the expected behavior you're looking for here. You mentioned a lag of 5 hours, but the question you want to disable the lag, do you want to use it or not? Could you please clarify that?

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by marasoft@netrom.ro »

Hello,

The main functionality we are looking for is strictly related to the dependency itself: the end of one event forcing the start of another. We want to keep the initial start and end dates for events, even if there are active dependencies while mounting Bryntum Scheduler.
Keeping the lag could be an extra functionality for us, but without forcing the event position. Let's say we want a behavior like minimum lag if possible.

To understand our request, we will try to explain a workaround we have tried:

While mounting, we set all the events to manuallyScheduled = true. After loading all the data, we activate the auto-scheduling by setting manuallyScheduled = false for all the events. At present, while activating auto-scheduling, the events are moved to fit the lags; we are trying to avoid this behavior.


Post by alex.l »

Hi,

You just need to remove value from lag property. Unfortunately, we do not have built-in functionality to ignore lag only. You also can try to override getter for lag in DependencyModel and always return 0. But still, it might update it on data level too, need to be tested, it's not designed to work like that, just thoughts.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post Reply