I have lessons that are in different categories in a Kanban board (structure is kinda like Weweb academy where a program has a couple of categories and each category has lessons):
When I try to move a card from one stack to another in this Kanban, the “EventUpdatedList” doesn’t give me the entire array of lessons, but only the lessons in the new column.
You can see here, selectedLessonsofProgram has 7 objects in the array (7 lessons), but in the next step when I try to update this variable with the new “Eventupdatedlist”, it only has 4 objects not 7.
Hi, it’s a design choice, the kanban event contain only the list where the item was added or moved.
Do you really need to update the others column items index ? Even if it create a void between index 0 and 2 for exemple it will still be ordered correctly, and if you move something inside this column the correct index will be applied and it will no longer have a “void”
If its important for you, you can instead put a workflow on the stack, you will have a workflow on add, on remove, and on move.
So when you move item 2 from category 2 to category 3
it will trigger on add on cat 3, with the new list of cat 3
It will trigger on remove on cat 2, with the new list of cat 2
And so you will be able to update the index of every items impacted by the change
My first question was, do your really need Caleb to be updated ? Does it break something if there is no item at position #2 as long as they are properly ordered ?
If yes you have two options :
A. On the event we give you the from and the to columns, so you can just add another iteration in your workflow and go through your filtered items by column from and refresh the order property for every items.