Hi,
In all models there is a field named create_uid , which will record the id of the user who created the record. So in your case you can use the create_uid field as task initiator or better you can create/use any of existing fields in the model to handle it.
Now lets assume the field is create_uid itself, then on changing the state of tasks, it might be either by a button click or just drag and drop, so inside the write function or corresponding function, you can get the task initiator id from self.create_uid then you can compare it with the logged in user.
You can get the current logged in user from this : self.env.user.id
So you can compare it like this,
if self.env.user.id == self.create_uid:
print("yes")
else:
raise warning
Thanks