Index field for tasks

Discuss issues related to v5.x
Post Reply
User avatar
wispoz
Posts: 166
Joined: Fri Mar 28, 2014 2:17 pm

Index field for tasks

Post by wispoz » Mon Apr 08, 2019 2:31 pm

Hello, its possible to set ignore updating index field on store sort?
Example
i Add tasks:
Task 1, Duration 1
Task 2 , Duration 3
Task 3, Duration 2

and save to backend, and reload store i get
Task 1, Duration 1
Task 2 , Duration 2
Task 3, Duration 3

and its ok

if i sort by Duration and save to backend end reload store, i get
Task 1, Duration 1
Task 3, Duration 2
Task 2 , Duration 3

and this confusing..

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 1261
Joined: Fri Apr 01, 2016 11:08 am

Re: Index field for tasks

Post by pmiklashevich » Mon Apr 08, 2019 4:39 pm

Please change index field to be not persistable on the task model:

Code: Select all

    fields : [
        { name: 'index', type : 'int', persist : false },
    ],
Pavel Miklashevich - Core Developer

User avatar
wispoz
Posts: 166
Joined: Fri Mar 28, 2014 2:17 pm

Re: Index field for tasks

Post by wispoz » Mon Apr 08, 2019 5:27 pm

pmiklashevich wrote:
Mon Apr 08, 2019 4:39 pm
Please change index field to be not persistable on the task model:

Code: Select all

    fields : [
        { name: 'index', type : 'int', persist : false },
    ],
I dont think its solution, because if user want to change sorting manually, by drag and drop, sorting not save

Its possible to save WBS ? on store sync?

User avatar
mats
Core Developer
Core Developer
Posts: 13550
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Index field for tasks

Post by mats » Mon Apr 08, 2019 6:33 pm

You should then set persistable to "false" when your users sort, to disable the saving of the index field.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
wispoz
Posts: 166
Joined: Fri Mar 28, 2014 2:17 pm

Re: Index field for tasks

Post by wispoz » Tue Apr 09, 2019 10:38 am

mats wrote:
Mon Apr 08, 2019 6:33 pm
You should then set persistable to "false" when your users sort, to disable the saving of the index field.
Nope, i will try something else, index must be send to server but it must be controlled somehow.

Its possible calculate WBS and send to server (like field, not method getWBSCode() )?
Its possible make custom WBS calculation by template like MS Project do?

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 1261
Joined: Fri Apr 01, 2016 11:08 am

Re: Index field for tasks

Post by pmiklashevich » Tue Apr 09, 2019 3:00 pm

Its possible calculate WBS and send to server (like field, not method getWBSCode() )?
Please modify the task model. Provide a field and calculate its value based on getWBSCode function.
Its possible make custom WBS calculation by template like MS Project do?
getWBSCode method is public, so feel free to override it to get the format you want.

If our implementation doesn't fit your needs, you can create a new column, a new selection model based on Ext.grid.selection.SpreadsheetModel with getNumbererColumnConfig function overridden and a new field to take the data from. Everything is possible.

Best,
Pavel
Pavel Miklashevich - Core Developer

User avatar
wispoz
Posts: 166
Joined: Fri Mar 28, 2014 2:17 pm

Re: Index field for tasks

Post by wispoz » Wed Apr 10, 2019 10:45 am

pmiklashevich wrote:
Tue Apr 09, 2019 3:00 pm
Its possible calculate WBS and send to server (like field, not method getWBSCode() )?
Please modify the task model. Provide a field and calculate its value based on getWBSCode function.
Its possible make custom WBS calculation by template like MS Project do?
getWBSCode method is public, so feel free to override it to get the format you want.

If our implementation doesn't fit your needs, you can create a new column, a new selection model based on Ext.grid.selection.SpreadsheetModel with getNumbererColumnConfig function overridden and a new field to take the data from. Everything is possible.

Best,
Pavel
Thx, any thoughts or concerns about calculation WBS based on getWBSCode function on big dataset ?

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 1261
Joined: Fri Apr 01, 2016 11:08 am

Re: Index field for tasks

Post by pmiklashevich » Wed Apr 10, 2019 11:07 am

The more records you have the more times the calculation is done. But I hope it won't be too noticeable. Please let us know if you experience performance issue due to WBS column.
Pavel Miklashevich - Core Developer

User avatar
wispoz
Posts: 166
Joined: Fri Mar 28, 2014 2:17 pm

Re: Index field for tasks

Post by wispoz » Wed Apr 10, 2019 11:08 am

pmiklashevich wrote:
Wed Apr 10, 2019 11:07 am
The more records you have the more times the calculation is done. But I hope it won't be too noticeable. Please let us know if you experience performance issue due to WBS column.
Ok i will try on project with 2500 tasks with dependencies, and tell you results. Thx.

Post Reply