Page 1 of 1

[Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Tue Sep 14, 2021 12:38 am
by licjapodaca

Hi there, there is an issue when I reaload the Gantt component with the enddate column value as you can see in the following Animated GIF:

incorrect-enddate-value.gif
incorrect-enddate-value.gif (5.62 MiB) Viewed 489 times

The first time I visit the Gantt component everithing it's OK with the enddate column, but when I reload the data in Gantt component, the raw values are OK but when they renders in the component the enddate value changes ...

Waiting for your comments...

Regards


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Tue Sep 14, 2021 10:28 am
by alex.l

Hi licjapodaca,

Any chance to get full JSON data for both requests?
If data are equal in both cases, there should be no changes and this is a bug, but we should be able to reproduce it.


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Tue Sep 14, 2021 6:25 pm
by licjapodaca

Sure, this is the JSON of the first request that is OK:

{
	"success": true,
	"project": {
		"calendar": "lunesDomingo",
		"hoursPerDay": 8,
		"daysPerWeek": 7,
		"daysPerMonth": 30
	},
	"calendars": {
		"rows": [
			{
				"id": "lunesDomingo",
				"name": "Lunes a Domingo (8 hrs)",
				"intervals": [
					{
						"recurrentStartDate": "at 0:00",
						"recurrentEndDate": "at 8:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "at 13:00",
						"recurrentEndDate": "at 14:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "at 17:00",
						"recurrentEndDate": "at 0:00",
						"isWorking": false
					}
				],
				"expanded": true
			},
			{
				"id": "lunesViernes",
				"name": "Lunes a Viernes (8 hrs)",
				"intervals": [
					{
						"recurrentStartDate": "on Sat at 0:00",
						"recurrentEndDate": "on Mon at 0:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "every weekday at 0:00",
						"recurrentEndDate": "every weekday at 8:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "every weekday at 13:00",
						"recurrentEndDate": "every weekday at 14:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "every weekday at 17:00",
						"recurrentEndDate": "every weekday at 0:00",
						"isWorking": false
					}
				],
				"expanded": true
			}
		]
	},
	"tasks": {
		"rows": [
			{
				"id": 80969,
				"name": "tarea 1",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-01-01",
				"endDate": "2021-01-29",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 21.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 80970,
				"name": "tarea 2",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-02-01",
				"endDate": "2021-02-26",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 20.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89435,
				"name": "tarea 3",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2012-03-01",
				"endDate": "2012-03-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89436,
				"name": "tarea 4",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-04-01",
				"endDate": "2021-04-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89437,
				"name": "tarea 5",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-05-03",
				"endDate": "2021-05-31",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 21.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89557,
				"name": "tarea 6",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-06-01",
				"endDate": "2021-06-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89558,
				"name": "tarea 7",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-07-01",
				"endDate": "2021-07-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89559,
				"name": "tarea 8",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-08-02",
				"endDate": "2021-08-31",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89560,
				"name": "tarea 9",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-09-01",
				"endDate": "2021-09-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89561,
				"name": "tarea 10",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-10-01",
				"endDate": "2021-11-01",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89562,
				"name": "tarea 11",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-11-01",
				"endDate": "2021-11-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89563,
				"name": "tarea 12",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-12-01",
				"endDate": "2021-12-31",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 23.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			}
		]
	},
	"dependencies": {},
	"resources": {
		"rows": [
			{
				"id": -1402,
				"name": "sddd sdsdsds",
				"resourceInitials": "SS"
			},
			{
				"id": -1258,
				"name": "jdkhjkh jkhjkdhjk",
				"resourceInitials": "JJ"
			},
			{
				"id": -1203,
				"name": "sdsdsd sdsdsd",
				"resourceInitials": "SS"
			},
			{
				"id": -856,
				"name": "Leslie Prueba Haros Amezquita",
				"resourceInitials": "LH"
			},
			{
				"id": -746,
				"name": "ESTEBAN Mejia García",
				"resourceInitials": "EM"
			},
			{
				"id": -681,
				"name": "Alejandro Oliva Moreno",
				"resourceInitials": "AO"
			},
			{
				"id": -662,
				"name": "Pablo Picasso",
				"resourceInitials": "PP"
			},
			{
				"id": -426,
				"name": "César Sanchez Arenas",
				"resourceInitials": "CS"
			},
			{
				"id": -252,
				"name": "Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Art Cadena",
				"resourceInitials": "AC"
			},
			{
				"id": -248,
				"name": "Julieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Romero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Rom García García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía Ga",
				"resourceInitials": "JR",
				"imageUrl": "https://tprede.blob.core.windows.net/200265/tenant/200265/empleados/fotos/4b73b843-324a-4aac-90a4-39331c05e0f2.jpeg?sv=2018-03-28&sr=c&sig=2yhsRGgqUFOwOyZ4qz9uGU1pxROWjy2MlanzAOsNO%2Fg%3D&st=2021-09-14T16%3A15%3A58Z&se=2021-09-15T16%3A20%3A58Z&sp=rwdl"
			}
		]
	},
	"assignments": {},
	"timeRanges": {}
}

And this is the second JSON request that modify the enddate for some reason when I reaload the Gantt again:

{
	"success": true,
	"project": {
		"calendar": "lunesDomingo",
		"hoursPerDay": 8,
		"daysPerWeek": 7,
		"daysPerMonth": 30
	},
	"calendars": {
		"rows": [
			{
				"id": "lunesDomingo",
				"name": "Lunes a Domingo (8 hrs)",
				"intervals": [
					{
						"recurrentStartDate": "at 0:00",
						"recurrentEndDate": "at 8:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "at 13:00",
						"recurrentEndDate": "at 14:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "at 17:00",
						"recurrentEndDate": "at 0:00",
						"isWorking": false
					}
				],
				"expanded": true
			},
			{
				"id": "lunesViernes",
				"name": "Lunes a Viernes (8 hrs)",
				"intervals": [
					{
						"recurrentStartDate": "on Sat at 0:00",
						"recurrentEndDate": "on Mon at 0:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "every weekday at 0:00",
						"recurrentEndDate": "every weekday at 8:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "every weekday at 13:00",
						"recurrentEndDate": "every weekday at 14:00",
						"isWorking": false
					},
					{
						"recurrentStartDate": "every weekday at 17:00",
						"recurrentEndDate": "every weekday at 0:00",
						"isWorking": false
					}
				],
				"expanded": true
			}
		]
	},
	"tasks": {
		"rows": [
			{
				"id": 80969,
				"name": "tarea 1",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-01-01",
				"endDate": "2021-01-29",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 21.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 80970,
				"name": "tarea 2",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-02-01",
				"endDate": "2021-02-26",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 20.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89435,
				"name": "tarea 3",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2012-03-01",
				"endDate": "2012-03-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89436,
				"name": "tarea 4",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-04-01",
				"endDate": "2021-04-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89437,
				"name": "tarea 5",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-05-03",
				"endDate": "2021-05-31",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 21.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89557,
				"name": "tarea 6",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-06-01",
				"endDate": "2021-06-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89558,
				"name": "tarea 7",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-07-01",
				"endDate": "2021-07-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89559,
				"name": "tarea 8",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-08-02",
				"endDate": "2021-08-31",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89560,
				"name": "tarea 9",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-09-01",
				"endDate": "2021-09-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89561,
				"name": "tarea 10",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-10-01",
				"endDate": "2021-11-01",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89562,
				"name": "tarea 11",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-11-01",
				"endDate": "2021-11-30",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 22.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			},
			{
				"id": 89563,
				"name": "tarea 12",
				"elementType": "tarea",
				"percentDone": 0,
				"startDate": "2021-12-01",
				"endDate": "2021-12-31",
				"calendar": "lunesViernes",
				"expanded": true,
				"duration": 23.00,
				"durationUnit": "day",
				"color": "red",
				"manuallyScheduled": true,
				"showInTimeline": true,
				"draggable": false,
				"resizable": false
			}
		]
	},
	"dependencies": {},
	"resources": {
		"rows": [
			{
				"id": -1402,
				"name": "sddd sdsdsds",
				"resourceInitials": "SS"
			},
			{
				"id": -1258,
				"name": "jdkhjkh jkhjkdhjk",
				"resourceInitials": "JJ"
			},
			{
				"id": -1203,
				"name": "sdsdsd sdsdsd",
				"resourceInitials": "SS"
			},
			{
				"id": -856,
				"name": "Leslie Prueba Haros Amezquita",
				"resourceInitials": "LH"
			},
			{
				"id": -746,
				"name": "ESTEBAN Mejia García",
				"resourceInitials": "EM"
			},
			{
				"id": -681,
				"name": "Alejandro Oliva Moreno",
				"resourceInitials": "AO"
			},
			{
				"id": -662,
				"name": "Pablo Picasso",
				"resourceInitials": "PP"
			},
			{
				"id": -426,
				"name": "César Sanchez Arenas",
				"resourceInitials": "CS"
			},
			{
				"id": -252,
				"name": "Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Artemisa Art Cadena",
				"resourceInitials": "AC"
			},
			{
				"id": -248,
				"name": "Julieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Julieta Julieta JulietaJulieta Romero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Romero Romero RomeroRomero Romero Rom García García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía García García García García GarcíaGarcía Ga",
				"resourceInitials": "JR",
				"imageUrl": "https://tprede.blob.core.windows.net/200265/tenant/200265/empleados/fotos/4b73b843-324a-4aac-90a4-39331c05e0f2.jpeg?sv=2018-03-28&sr=c&sig=HInOIBf57GBzo%2Fjus%2BIekd9Rw0x1r93RvaFhjdJdOIo%3D&st=2021-09-14T16%3A16%3A25Z&se=2021-09-15T16%3A21%3A25Z&sp=rwdl"
			}
		]
	},
	"assignments": {},
	"timeRanges": {}
}

Regards


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Tue Sep 14, 2021 9:05 pm
by licjapodaca

Here is another example:

incorrect-month-console.png
incorrect-month-console.png (259.6 KiB) Viewed 474 times

Regards


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Tue Sep 14, 2021 9:29 pm
by licjapodaca

I solve my issue specifying the renderer property at the moment I define the column 'startDate' and 'endDate' like so:

{
	type: 'enddate',
	format: 'D MMM YYYY',
	renderer: function({ record }) {
		return Ext.Date.format(record.get('endDate'), 'j M Y').toLocaleLowerCase(); //<== record.get('endDate') solves my problem
	}
}

But the problem internally still present if I get the value directly like this record.endDate the value is incorrect, but if I get the value like this record.get('endDate') the value is now correct, is this an issue?

Regards


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Wed Sep 15, 2021 12:06 am
by mats

We would need to see an isolated test case showing this issue, then we can assist you.


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Wed Sep 15, 2021 2:56 am
by licjapodaca

Hi @mats, you can see the issue if you access to our SaaS solution with the credentials that we already sent you by email to support@bryntum.com from our account "admonti@bts.com.mx". Our SaaS solution called "Temis".

If you add a breakpoint to that line of code return Ext.Date.format(record.get('endDate'), 'j M Y').toLocaleLowerCase(); you will see the behavior getting different values from the same field with record.endDate and record.get('endDate').

Waiting for your comments.

Regards


Re: [Issue] - Incorrect enddate value when loading the Gantt v4.2.5 component

Posted: Wed Sep 15, 2021 11:41 am
by mats

Ok, we cannot help you unless we see a clear isolated test case I'm afraid.