creecros / MetaMagik

Custom Fields for Kanboard - Plugin MetaMagik
MIT License
98 stars 16 forks source link

Bug with MetaMagik #90

Closed JF-OD closed 1 year ago

JF-OD commented 1 year ago

Since KB 1.2.27 (and still in KB 1.2.28), when someone create a new task, the creator_id value in the tasks table stays at 0. I found that if I remove the MetaMagik plugin, then create a new task, the creator_id is filled with the correct user ID.

I fixed it by replacing this code from the NewTaskCreationModel.php file

if ($this->userSession->isLogged() && !empty($values['creator_id'])) { $values['creator_id'] = $this->userSession->getId(); }

By this

if ($this->userSession->isLogged()) { $values['creator_id'] = $this->userSession->getId(); }

It works but I don’t know if this is the correct way to do it

Thanks!

creecros commented 1 year ago

Already fixed in latest version 1.5.5