joheben Hey, Joheben!
While I can't give you any real tips on DB structure, I was able to modify class.ticket.php in just a few locations to accomplish our shared goal: Unassign Team when claimed by / assigned to an individual agent.
For example. in function assignToStaff
I added the line
$this->setTeamId(0);
before
$this->onAssign($staff, $note, $alert);
I also added that same line in function postReply
after the line $this->setStaffId($thisstaff->getId());
Similarly, in function assign
I added $this->team_id=0;
after the line $this->staff_id = $assignee->getId();
I think that's it, at least for for how I use osTicket. You will have to reverse engineer if you want Agent to be unassigned when reassigned to a team.
Hope that helps!
I am on:
osTicket Version v1.12 (a076918) — Up to date
Web Server Software Apache/2.4.18 (Ubuntu)
MySQL Version 5.7.27
PHP Version 5.6.40-10+ubuntu16.04.1+deb.sury.org+1
Sorry if I have violated any syntax or other conventions of this forum when posting this reply.