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

Gantt not mapping dataSource for task name field #7741

Closed
taauntik opened this issue Oct 25, 2023 · 1 comment
Closed

Gantt not mapping dataSource for task name field #7741

taauntik opened this issue Oct 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed OEM OEM customer premium regression Worked previously, now broken resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@taauntik
Copy link

Forum post

Reproducible https://bryntum.com/products/gantt/examples/basic/

Replace the code with the code below

class MyTaskModel extends TaskModel {
	static idField = 'Task.Id';
	static childrenField = 'ChildTasks';

	static get fields() {
		return [
			{ name: 'name', dataSource: 'Task.Name' },
			{ name: 'startDate', dataSource: 'Task.Start_Date__c' },
			{ name: 'endDate', dataSource: 'Task.End_Date__c' },
			{ name: 'manuallyScheduled', defaultValue: true },
			{ name: 'expanded', defaultValue: true }
		];
	}
}


const gantt = new Gantt({
    project : {
        taskModelClass : MyTaskModel
    },
    appendTo          : 'container',
    columns           : [
		{ type: 'name', width: 250 },
		{ type: 'startdate' },
		{ type: 'enddate' }
	]
});


gantt.project.loadCrudManagerData({
	success: true,
	project: {
		Name: 'Test Project'
	},
	tasks: {
		rows: [
			{
				Task: {
					Id: '001',
					Name: 'Test Task',
					Start_Date__c: '2021-12-12',
					End_Date__c: '2021-12-14'
				},
				ChildTasks: [{
					Task: {
						Id: '002',
						Name: 'Child Task',
						Start_Date__c: '2021-12-12',
						End_Date__c: '2021-12-14'
					},
					ChildTasks: []
				}]
			}
		]
	}
});
@taauntik taauntik added bug Something isn't working regression Worked previously, now broken premium forum Issues from forum OEM OEM customer labels Oct 25, 2023
@marciogurka
Copy link

User asked for a test/live example for that fix here

@isglass isglass added the high-priority Urgent to have fixed label Oct 25, 2023
@mazzafabio mazzafabio self-assigned this Oct 26, 2023
@mazzafabio mazzafabio added in progress ready for review Issue is fixed, the pull request is being reviewed labels Oct 26, 2023
@mazzafabio mazzafabio added resolved Fixed but not yet released (available in the nightly builds) and removed in progress ready for review Issue is fixed, the pull request is being reviewed labels Nov 21, 2023
@mazzafabio mazzafabio added this to the 5.6.2 milestone Nov 21, 2023
@matsbryntse matsbryntse reopened this Nov 21, 2023
@isglass isglass closed this as completed Nov 24, 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 OEM OEM customer premium regression Worked previously, now broken resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

5 participants