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

Crash when dragging events between two schedulers #6133

Closed
matsbryntse opened this issue Feb 8, 2023 · 1 comment
Closed

Crash when dragging events between two schedulers #6133

matsbryntse opened this issue Feb 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed large-account Reported by large customer OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@matsbryntse
Copy link
Member

Forum post

Hello Bryntum Team,

I have a problem with configuring Bryntum dragging between schedulers using https://bryntum.com/products/scheduler/examples/drag-between-schedulers/ as an example. But after drag ends it throws error in console:

ERROR Error: Uncaught (in promise): TypeError: record.instanceMeta is not a function
TypeError: record.instanceMeta is not a function
    at SchedulerPro.isInTimeAxis (schedulerpro.module.js:173407:20)
    at schedulerpro.module.js:154121:36
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:24)
    at _next (asyncToGenerator.js:22:9)
    at asyncToGenerator.js:27:7
    at new ZoneAwarePromise (zone.js:1429:21)
    at asyncToGenerator.js:19:12
    at EventDrag.updateAssignments (schedulerpro.module.js:154187:6)
    at schedulerpro.module.js:153802:25
    at resolvePromise (zone.js:1211:31)
    at zone.js:1118:17
    at zone.js:1134:33
    at _ZoneDelegate.invoke (zone.js:372:26)
    at Object.onInvoke (core.mjs:24313:33)
    at _ZoneDelegate.invoke (zone.js:371:52)
    at Zone.run (zone.js:134:43)
    at zone.js:1275:36
    at _ZoneDelegate.invokeTask (zone.js:406:31)
    at core.mjs:23999:55

After some debugging it looks like isInTimeAxis function gets record's id as value instead of reference to dragged record and this is done in:

// Pro Engine does not seem to handle having the event already in place on the copied assignment,
// replacing it with id to have events bucket properly set up on commit
if (newAssignment.event) {
  newAssignment.event = newAssignment.event.id;
  newAssignment.resource = newAssignment.resource.id;
}

Not sure if i'm doing something wrong?
Also here is drag configuration:

eventDrag: {
	showTooltip: false,
	constrainDragToTimeSlot: true,
	constrainDragToTimeline: false
}
@matsbryntse matsbryntse added bug Something isn't working premium forum Issues from forum large-account Reported by large customer OEM OEM customer ready for review Issue is fixed, the pull request is being reviewed and removed ready for review Issue is fixed, the pull request is being reviewed labels Feb 8, 2023
@jsakalos
Copy link

jsakalos commented Feb 9, 2023

To reproduce:

  1. unzip drag-between-schedulers.zip to SchedulerPro/examples and then run it.
  2. drag an event from the bottom scheduler to the top one
  3. it crashes:

Screenshot 2023-02-09 at 16 38 14

Note: The content of app.js is copy & paste from Scheduler examples adjusted to use SchedulerPro.

@matsbryntse matsbryntse added the high-priority Urgent to have fixed label Feb 11, 2023
@isglass isglass added the resolved Fixed but not yet released (available in the nightly builds) label Feb 14, 2023
@isglass isglass self-assigned this Feb 14, 2023
@isglass isglass added this to the 5.2.10 milestone Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed large-account Reported by large customer OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

3 participants