Post by jaykishan »

shaveta wrote: Tue May 18, 2021 12:58 pm

I have added a logic in my code to always write wbs value and sequence.

Hello shaveta,

i want to store sequence at server side, so can you please share that code snippet with me.

Thanks in advance.


Post by shaveta »

jaykishan wrote: Wed Dec 28, 2022 1:41 pm
shaveta wrote: Tue May 18, 2021 12:58 pm

I have added a logic in my code to always write wbs value and sequence.

Hello shaveta,

i want to store sequence at server side, so can you please share that code snippet with me.

Thanks in advance.

In the task model, if you include a sequence field like below, it should work. Hope it helps

{ name: 'sequenceNumber', type: 'number' },

Post by jaykishan »

shaveta wrote: Wed Dec 28, 2022 1:45 pm
jaykishan wrote: Wed Dec 28, 2022 1:41 pm
shaveta wrote: Tue May 18, 2021 12:58 pm

I have added a logic in my code to always write wbs value and sequence.

Hello shaveta,

i want to store sequence at server side, so can you please share that code snippet with me.

Thanks in advance.

In the task model, if you include a sequence field like below, it should work. Hope it helps

{ name: 'sequenceNumber', type: 'number' },

Okay shaveta i appriciate your help here, but can you please guide me with the file path like in which JS file i can apply that change ?


Post by shaveta »

jaykishan wrote: Wed Dec 28, 2022 1:53 pm
shaveta wrote: Wed Dec 28, 2022 1:45 pm
jaykishan wrote: Wed Dec 28, 2022 1:41 pm

Hello shaveta,

i want to store sequence at server side, so can you please share that code snippet with me.

Thanks in advance.

In the task model, if you include a sequence field like below, it should work. Hope it helps

{ name: 'sequenceNumber', type: 'number' },

Okay shaveta i appriciate your help here, but can you please guide me with the file path like in which JS file i can apply that change ?

You can copy it in task.js file provided in advanced gantt example, it has logic to extend default Task class with additional fields


Post by jaykishan »

shaveta wrote: Wed Dec 28, 2022 1:57 pm
jaykishan wrote: Wed Dec 28, 2022 1:53 pm
shaveta wrote: Wed Dec 28, 2022 1:45 pm

In the task model, if you include a sequence field like below, it should work. Hope it helps

{ name: 'sequenceNumber', type: 'number' },

Okay shaveta i appriciate your help here, but can you please guide me with the file path like in which JS file i can apply that change ?

You can copy it in task.js file provided in advanced gantt example, it has logic to extend default Task class with additional fields

Okay so based on your suggestion i added the code inside

Task.js

and after that if i re-arrange the tasks it gives me only the below output.

{'parentIndex': 1, 'id': 'project-task_456'}

So i am looking for that sequence number on above response !!


Post by marcio »

Hey jaykishan,

Could you please share how does your Task.js file look like??

Best regards,
Márcio


Post by jaykishan »

marcio wrote: Wed Dec 28, 2022 9:33 pm

Hey jaykishan,

Could you please share how does your Task.js file look like??

Hello marcio,

i have added code like '{ name: 'sequenceNumber', type: 'number'},' and its not working.
but after added like this '{ name: 'sequenceNumber', type: 'number', alwaysWrite : true },' its working fine. when i re-order record in gantt view its working.

but can you please help me to get sequence number data when i reload gantt view.
because i need to send that data in server when i reload gantt view

Thanks in advance


Post by alex.l »

Please check this config for projectModel https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-silenceInitialCommit
Sounds like this is that you're looking for

All the best,
Alex


Post by jaykishan »

alex.l wrote: Thu Dec 29, 2022 8:13 am

Please check this config for projectModel https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-silenceInitialCommit
Sounds like this is that you're looking for

Hello alex,

i have added code :
project : {
silenceInitialCommit : true,
}

inside static get defaultConfig() in projectModel.js and i checked after loading the gantt view but in server sequence field not updated

let me know if i added code on wrong place

Thanks


Post by marcio »

Hello jaykishan,

Actually, I believe Alex suggested setting that option to false, as the default value for that option is true. You put the configuration in the right place, inside the project configuration.

Best regards,
Márcio


Post Reply