Drag/Drop cards to change sequence

Our Kanban Task Board for easy management of tasks and agile workflows
User avatar
shaveta
Premium Member
Premium Member
Posts: 312
Joined: Tue Jul 29, 2014 9:48 pm

Drag/Drop cards to change sequence

Post by shaveta » Fri Jun 28, 2019 7:14 pm

Hi,

In https://www.bryntum.com/examples/taskboard-for-extjs/kitchensink/#examples/subtasks example, the drag/drop of cards to change sequence is working in "test" column, but not in "Not Started"

I can't change position of Id:2 at top.Is this default behavior?
How can i allow drag/drop for all States?

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

Re: Drag/Drop cards to change sequence

Post by mats » Sun Jun 30, 2019 9:43 am

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
shaveta
Premium Member
Premium Member
Posts: 312
Joined: Tue Jul 29, 2014 9:48 pm

Re: Drag/Drop cards to change sequence

Post by shaveta » Mon Jul 01, 2019 6:52 am

mats wrote:
Sun Jun 30, 2019 9:43 am
Confirmed, fixed now in our sources. Ticket https://app.assembla.com/spaces/bryntum/tickets/8822-not-possible-to-reorder-tasks-in-same-column/details#
Do i need to apply some patch in our code to make it fix?

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

Re: Drag/Drop cards to change sequence

Post by pmiklashevich » Mon Jul 01, 2019 9:38 am

Just download nightlies from the customer zone to get the fixed version
Pavel Miklashevich - Core Developer

User avatar
shaveta
Premium Member
Premium Member
Posts: 312
Joined: Tue Jul 29, 2014 9:48 pm

Re: Drag/Drop cards to change sequence

Post by shaveta » Mon Jul 01, 2019 10:22 am

pmiklashevich wrote:
Mon Jul 01, 2019 9:38 am
Just download nightlies from the customer zone to get the fixed version
Thanks!! I will download it.

Is there any property like sequence to control it?

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

Re: Drag/Drop cards to change sequence

Post by pmiklashevich » Mon Jul 01, 2019 10:41 am

Is there any property like sequence to control it?
positionField is responsible for the sequence. Please see the docs: https://www.bryntum.com/docs/taskboard-for-extjs/#!/api/Kanban.model.Task-field-Position
Pavel Miklashevich - Core Developer

User avatar
shaveta
Premium Member
Premium Member
Posts: 312
Joined: Tue Jul 29, 2014 9:48 pm

Re: Drag/Drop cards to change sequence

Post by shaveta » Wed Aug 07, 2019 4:46 pm

pmiklashevich wrote:
Mon Jul 01, 2019 10:41 am
Is there any property like sequence to control it?
positionField is responsible for the sequence. Please see the docs: https://www.bryntum.com/docs/taskboard-for-extjs/#!/api/Kanban.model.Task-field-Position
Thanks Pavel!!

On drag/drop of task card, is there any method that provides the Sequence/Position of all changed tasks?

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

Re: Drag/Drop cards to change sequence

Post by pmiklashevich » Wed Aug 07, 2019 8:13 pm

On drag/drop of task card,
What the "task card" is? Do you mean task element? Where you drag it? To the same column (state) or different?
Sequence/Position of all changed tasks?
What tasks do you mean?

Basically if you have a collection of changed tasks you can getPosition of each of them.

Code: Select all

Ext.first('taskboard').taskStore.getModifiedRecords().map(function(rec){
    return rec.getPosition()
})
Cheers,
Pavel
Pavel Miklashevich - Core Developer

User avatar
shaveta
Premium Member
Premium Member
Posts: 312
Joined: Tue Jul 29, 2014 9:48 pm

Re: Drag/Drop cards to change sequence

Post by shaveta » Thu Aug 22, 2019 6:01 am

pmiklashevich wrote:
Wed Aug 07, 2019 8:13 pm
On drag/drop of task card,
What the "task card" is? Do you mean task element? Where you drag it? To the same column (state) or different?
Sequence/Position of all changed tasks?
What tasks do you mean?

Basically if you have a collection of changed tasks you can getPosition of each of them.

Code: Select all

Ext.first('taskboard').taskStore.getModifiedRecords().map(function(rec){
    return rec.getPosition()
})
Cheers,
Pavel

Thanks Pavel!!

But the issue is if i drag the task and change its position, getModifiedRecords() doesn't return all records where sequence is changed and it is difficult to read all taskStore each time to update Sequence in database.

Can you please have a look and suggest me best approach? or the reason why getModifiedRecords() method returning all records with changed sequence

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

Re: Drag/Drop cards to change sequence

Post by pmiklashevich » Thu Aug 22, 2019 4:23 pm

Please provide a testcase where getModifiedRecords doesn't return all modified records. position is a field on task model. When you drag a task and its position is changed or other tasks positions are changed, the records are considered to be dirty and getModifiedRecords has to return them.
Pavel Miklashevich - Core Developer

Post Reply