Does not update the task linked to the event

If I have a task linked to an event in the agenda and I try to modify it and then save, the event always remains the first one set when the task was created. I attach an example screen. I change the task from TK2401-0038 to the task TK2401-0039 and save. I return to the event screen and the connected task is always TK2401-0038. Why doesn’t it update?

For this operation the user needs “read” permission on the module “projet” with the sub-module “task”.

It is possible to insert this right in the DB in the corresponding table

INSERT INTO `dolibarr`.`llx_rights_def` (`id`, `libelle`, `module`, `module_position`, `family_position`, `entity`, `perms`, `subperms`, `type`, `bydefault`, `tms`) VALUES ('2415', 'Can change linked objects (tasks) of events', 'projet', '14', '0', '1', 'task', 'read', 'r', '0', '2024-01-01 00:00:00');

Then you can activate the right on the permission-page for each user or group.

Or change the source code in ~/htdocs/user/class/user.class.php in the function “public function hasRight(…)”.
To do this, replace
‘task’ => ‘task@projet’, “
with
‘task’ => ‘all@projet’, “

However, I have not checked whether this has any undesirable effects.

I updated to version 22 and tried the above by inserting the row into the llx_rights_def table, but it doesn’t work

I tried again and it works. You also need to go to Users > Permissions and enable the permission.