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

Constraint data gets clearead when loading #7147

Closed
arcady-zherdev opened this issue Jul 11, 2023 · 1 comment
Closed

Constraint data gets clearead when loading #7147

arcady-zherdev opened this issue Jul 11, 2023 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@arcady-zherdev
Copy link

Reported here: https://forum.bryntum.com/viewtopic.php?t=25573

Steps to reproduce:

  1. edit Gantt/examples/_datasets/launch-saas.json file - replace tasks with this data:
  "tasks" : {
    "rows" : [{
      "cls": "",
      "name": "A test task",
      "effort": 24,
      "endDate": "2022-05-06T00:00:00+02:00",
      "calendar": null,
      "duration": 3,
      "inactive": null,
      "parentId": null,
      "segments": null,
      "baselines": [],
      "direction": null,
      "startDate": "2022-05-03T00:00:00+02:00",
      "effortUnit": "hour",
      "parentIndex": 4,
      "percentDone": 0,
      "unscheduled": false,
      "durationUnit": "day",
      "effortDriven": false,
      "constraintDate": "2022-05-03T00:00:00+02:00",
      "constraintType": "startnoearlierthan",
      "schedulingMode": "Normal",
      "manuallyScheduled": false,
      "ignoreResourceCalendar": null,
      "id": 28
    }
  ]
  },
  1. open advanced demo in a browser

Result: both constraint type and date fields are emply.

@arcady-zherdev arcady-zherdev added bug Something isn't working high-priority Urgent to have fixed forum Issues from forum labels Jul 11, 2023
@arcady-zherdev
Copy link
Author

After checking it looks the writeDirection code cannot handle direction : null properly. So a quick workaround is:

class Task extends TaskModel {

    static $name = 'Task';

    writeDirection(me, transaction, quark, direction, fromWriteConstraintType = false) {
        if (direction) {
            super.writeDirection(...arguments);
        }
        else {
            me.constructor.prototype.write.call(this, me, transaction, quark, direction);
        }
    }

}

@bmblb bmblb self-assigned this Jul 12, 2023
@bmblb bmblb added the ready for review Issue is fixed, the pull request is being reviewed label Jul 12, 2023
@arcady-zherdev arcady-zherdev added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Jul 12, 2023
@arcady-zherdev arcady-zherdev added this to the 5.4.1 milestone Jul 12, 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 resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

2 participants