Our flexible Kanban board for managing tasks with drag drop


Post by riley_procore »

We have a couple of task fields that we want to be included in the sync request every single time - both for new tasks and updated tasks.

The issue is that these fields are never changed, so they are not getting added in the sync payload.

We're attempting to use the task.set() functionality, with and without the silent parameter, but the fields never seem to be added to the payload.

How can we ensure certain fields are always added to the sync tasks payload even if the fields are unchanged?


Post by marcio »

Hey riley_procore,

Thanks for reaching out.

To ensure that certain fields are always included in the sync request, even if they haven't changed, you can use the alwaysWrite configuration for those fields. This configuration forces the field to be included in the sync payload regardless of whether it has been modified.

Here's how you can define a field with alwaysWrite:

class MyTaskModel extends TaskModel {
    static get fields() {
        return [
            { name: 'myField', type: 'string', alwaysWrite: true },
            // other fields
        ];
    }
}

By setting alwaysWrite: true for the field, it will be included in every sync request.

Documentation reference: https://bryntum.com/products/taskboard/docs/api/Core/data/field/DataField#config-alwaysWrite

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post Reply