Skip to Content
Menu
This question has been flagged
1 Reply
2302 Views


Hello,

I am calculating value of progressbar on the base of total tasks and assigned tasks for a particular user. I have total tasks but I dont know how to get assigned tasks of a user. So that this module should calculate progressbar on the base of assigned tasks of a user which is login?

Plz help me.


Avatar
Discard
Best Answer

Hi,

If you are looking to get the count of the task assigned to particular user, you can get it using the following code.


assigned_task = self.env['project.task'].search_count([('user_id', '=', id_of_the_user)])


The variable id_of_the_user should hold the value of the id of the users who, you want to get the assigned tasks count.


Thanks

Avatar
Discard