protected function composeFields()
    {
        $addFields = [];
        $updateFields = [];

        foreach ($this->entities as $entity) {
            if ($entity->id) {
                $updateFields[] = $entity->get();
            } else {
                $addFields[] = $entity->get();
            }
        }

        $this->fields['ACTION'] = 'ALL_EDIT';

        $fields = array_merge($addFields, $updateFields);

        if (count($fields)) {
            $this->fields['task_types'] = $fields;
        }
    }