Our flexible Kanban board for managing tasks with drag drop


Post by jasonlunsford »

Dear Support,

We need to create a workflow that allows users to create new TaskBoard tasks OUTSIDE of the TaskBoard. How can we create tasks programmatically, for example by using our own modal and calling the TaskBoard ref API? We would need to create the task and assign it to the right column (and potentially swimlane).

Thank you!


Post by tasnim »

Please see https://bryntum.com/products/taskboard/docs/api/TaskBoard/store/TaskStore#function-add

taskboard.project.taskStore.add({ name : 'Newly created task', status : 'todo', prio : 'high'  });

Post by jasonlunsford »

Hi Tasnim,

Okay that's easier than I thought - thank you! Follow up question: is there an event I can hook into AFTER the task is created? I need to fire an API that will allow us to save the newly added task.



Post by jasonlunsford »

Tasnim,

Can you please provide a code example? My configuration currently looks like this:

      <BryntumProjectModel
        ref={projectRef}
        events={taskData}
        taskModelClass={DeliverableTask}
      />
      <BryntumTaskBoard
        height={'100%'}
        ref={boardRef}
        taskRenderer={taskRenderer}
        project={projectRef}
        onBeforeTaskEdit={onEdit}
        {...taskBoardConfig}
      />

How can I configure BryntumProjectModel to use these features? Also, how do I configure it to call APIs when an autoSync is fired?


Post by marcio »

Hey Jason,

To configure that you can just simply add to the ProjectModel component

<BryntumProjectModel
        ref={projectRef}
        events={taskData}
        taskModelClass={DeliverableTask}
        autoSync={true}
        syncUrl="http://sampleurl.com/sync"
      />

With that configured, the backend URL will be called automatically.

Please check this guide for a better understanding of our CRUD manager https://bryntum.com/products/taskboard/docs/guide/TaskBoard/data/crud_manager

If you need to do some validation using that approach, you'll probably need to check https://bryntum.com/products/taskboard/docs/api/Scheduler/crud/AbstractCrudManagerMixin#event-beforeSync

Best regards,
Márcio


Post Reply