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

Copying events between schedulers is not correct #2037

Open
pmiklashevych opened this issue Dec 3, 2020 · 1 comment
Open

Copying events between schedulers is not correct #2037

pmiklashevych opened this issue Dec 3, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@pmiklashevych
Copy link

Forum: https://www.bryntum.com/forum/viewtopic.php?p=80095#p80095

http://lh/bryntum-suite/scheduler/examples/drag-between-schedulers/
When events in both schedulers have the same IDs, and you copy such events to another scheduler, it disappears.
See updateRecords and updateAssignments functions in EventDrag class. They have to be refactored.

Testcase1:
Set the first task id in Scheduler1 to existing id in Scheduler2:

    events    = [
        {
            id           : 11, // was 1 before
            resourceId   : 1,
            name         : 'First Task',

Drag "First task" from Scheduler1 to Scheduler2. See the task element disappears. Depends on the resource and time where you drop the result might be different, but it always buggy this or that way.

Testcase2:
There is copyKeyPressed hardcoded to false in updateRecords function. Try to set it to true.
Reload the page. Drag "First task" with Id 11 to the Scheduler2. It works. Drag another task from Scheduler1 to Scheduler2.
See the error:

SharedEventStoreMixin.js:388 Uncaught (in promise) TypeError: Cannot read property 'meta' of null
    at EventStore.update (SharedEventStoreMixin.js:388)
    at AssignmentStore.trigger (Events.js:1102)
    at AssignmentStore.dataReady (AbstractPartOfProjectStoreMixin.js:39)
    at ProjectModel.trigger (Events.js:1102)
    at ProjectModel.doCommitAsync (SchedulerCoreProjectMixin.js:384)
    at async Promise.all (/bryntum-suite/scheduler/examples/drag-between-schedulers/index 0)
    at async EventDrag.updateAssignments (EventDrag.js:621)
    at async EventDrag.updateRecords (EventDrag.js:381)
    at async EventDrag.finalize (DragBase.js:520)
@pmiklashevych pmiklashevych added the bug Something isn't working label Dec 3, 2020
@isglass isglass added this to the 4.x.x milestone Dec 3, 2020
@matsbryntse matsbryntse removed this from the 4.x.x milestone Jun 22, 2021
@JockeLindberg
Copy link

This is related to the EventDrag feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants