Skip to content

Commit

Permalink
dxGantt: fix treeList null dates displaying (T1204937) (DevExpress#26199
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zelik88 authored Dec 8, 2023
1 parent 35143d7 commit 2aefb9f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/runtime": "^7.12.1",
"@devextreme/runtime": "3.0.12",
"devexpress-diagram": "2.2.2",
"devexpress-gantt": "4.1.50",
"devexpress-gantt": "4.1.51",
"devextreme-quill": "1.6.3",
"devextreme-showdown": "^1.0.1",
"inferno": "^7.4.9",
Expand Down
24 changes: 24 additions & 0 deletions testing/tests/DevExpress.ui.widgets/ganttParts/dataSource.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,28 @@ QUnit.module('DataSources', moduleConfig, () => {
assert.ok(startDate - data.start < 1, 'new task start is right');
assert.ok(endDate - data.end < 1, 'new task end is right');
});
test('check treeList with null start end data in autoparent mode', function(assert) {
const tasks = [
{ 'id': 1, 'title': 'Software Development', 'start': null, 'end': null, 'progress': 31, 'color': 'red' },
{ 'id': 2, 'parentId': 1, 'title': 'Scope', 'start': new Date('2019-02-21T05:00:00.000Z'), 'end': new Date('2019-02-26T09:00:00.000Z'), 'progress': 60 },
{ 'id': 3, 'parentId': 2, 'title': 'Determine project scope', 'start': null, 'end': null, 'progress': 100 }
];
this.createInstance({
tasks: { dataSource: tasks },
editing: { enabled: true },
validation: { autoUpdateParentTasks: true },
columns: [
{ dataField: 'title', caption: 'Subject' },
{ dataField: 'start', caption: 'Start' },
{ dataField: 'end', caption: 'End Date' }
]
});
this.clock.tick(10);


const startText = $(this.instance._treeList.getCellElement(2, 1)).text().trimEnd();
const endText = $(this.instance._treeList.getCellElement(2, 2)).text().trimEnd();
assert.notOk(!!startText, 'start text is not empty');
assert.notOk(!!endText, 'end text is not empty');
});
});

0 comments on commit 2aefb9f

Please sign in to comment.