Our flexible Kanban board for managing tasks with drag drop


Post by stewart_wo »

Hi,

We created a taskboard and there we are created some tasks without resources. Now if later we came to this page and try to update these task with some resources assigned to them its giving us the error.

Use Case : Task created without resources assigned and later wants to update them with resources assigning.

add_task.png
add_task.png (42.57 KiB) Viewed 5565 times
update_task.png
update_task.png (38.21 KiB) Viewed 5565 times

Error : TypeError: Cannot read properties of null (reading 'id')

error_image.png
error_image.png (48.76 KiB) Viewed 5565 times

We are using below code to add/update resources into task

record.set('name', taskName);
record.set('opportunityService', taskData.opportunityService);
record.set('priority', taskData.priority);
record.set('description', taskData.description);
record.set('resources', taskData.salesPersonId ? [taskData.salesPersonId] : []);
record.set('resources', taskData.salesPersonId ? [taskData.salesPersonId] : []);

This line gives us the error.

Please suggest how to fix this and assign resource to already created task.

Thanks


Post by ahmadzaheer »

Hi Stewart,

Please use https://bryntum.com/products/taskboard/docs/api/Scheduler/model/mixin/EventModelMixin#function-assign. This method can be called on the task and we need to pass the resource to it.

If this doesn't work, can you please create a small reproducible test case and share with us.

Thanks,

Regards,
Ahmad Zaheer


Post Reply