Exemplo n.º 1
0
 /**
  * Set issue poster
  * 
  * @param TBGIdentifiableClass $poster The user/team you want to have posted the issue
  */
 public function setPostedBy(TBGIdentifiableClass $poster)
 {
     $this->_addChangedProperty('_posted_by', $poster->getID());
 }
Exemplo n.º 2
0
 public function removeAssignee(TBGIdentifiableClass $assignee)
 {
     $user_id = 0;
     $team_id = 0;
     if ($assignee instanceof TBGUser) {
         $user_id = $assignee->getID();
         TBGProjectAssignedUsersTable::getTable()->removeUserFromProject($this->getID(), $assignee->getID());
         foreach ($this->getAssignedUsers() as $user) {
             if ($user->getID() == $user_id) {
                 return;
             }
         }
     } else {
         $team_id = $assignee->getID();
         TBGProjectAssignedTeamsTable::getTable()->removeTeamFromProject($this->getID(), $assignee->getID());
         foreach ($this->getAssignedTeams() as $team) {
             if ($team->getID() == $team_id) {
                 return;
             }
         }
     }
     TBGContext::removeAllPermissionsForCombination($user_id, 0, $team_id, $this->getID());
 }