Ejemplo n.º 1
0
 public function executeShow(sfWebRequest $request)
 {
     $this->checkProject($request);
     $this->checkProfile($request, $this->ei_project);
     $this->checkSubject($request, $this->ei_project);
     $this->ei_subject_solution = Doctrine_Core::getTable('EiSubjectSolution')->find(array($request->getParameter('id')));
     $this->forward404Unless($this->ei_subject_solution);
     //Gestion des fichiers attachés
     $this->guardUser = $this->getUser()->getGuardUser();
     $this->subjectAttachments = Doctrine_Core::getTable('EiSubjectAttachment')->findBySubjectIdAndType($this->ei_subject->getId(), sfConfig::get('app_bug_attachment_solution'));
     //Formulaire d'ajout d'un nouveau attachment
     $attach = new EiSubjectAttachment();
     $attach->setSubjectId($this->ei_subject->getId());
     $attach->setType(sfConfig::get('app_bug_attachment_solution'));
     $attach->setAuthorId($this->guardUser->getId());
     $this->newAttachForm = new EiSubjectAttachmentForm($attach);
 }
Ejemplo n.º 2
0
 public function executeShow(sfWebRequest $request)
 {
     $this->guardUser = $this->guard_user;
     $this->checkProject($request);
     //Récupération du projet
     $this->defaultIntervention = $this->ei_user->getDefaultIntervention($this->ei_project);
     //Récupération de l'intervention par défaut
     //Récupération du type de méssage question et réponse
     $this->msgQuestion = Doctrine_Core::getTable('EiSubjectMessageType')->findOneByNameAndProjectIdAndProjectRef("Question", $this->ei_project->getProjectId(), $this->ei_project->getRefId());
     $this->msgAnswer = Doctrine_Core::getTable('EiSubjectMessageType')->findOneByNameAndProjectIdAndProjectRef("Answer", $this->ei_project->getProjectId(), $this->ei_project->getRefId());
     $this->checkProfile($request, $this->ei_project);
     //Récupération du profil courant
     $this->checkSubject($request, $this->ei_project);
     /* Recupération de l'historique des assignations au bug */
     $this->bugAssignmentHistorys = $this->ei_subject->getAssignmentsHistory();
     $this->subjectAuthor = Doctrine_Core::getTable('sfGuardUser')->findOneById($this->ei_subject->getAuthorId());
     $this->subjectAttachments = Doctrine_Core::getTable('EiSubjectAttachment')->findBySubjectIdAndType($this->ei_subject->getId(), sfConfig::get('app_bug_attachment_description'));
     //Recherche des utilisateurs assignés et non-assignés au subjet
     $this->getAssignAndNonAssignUserToSubject($this->ei_subject);
     $this->projectUsers = Doctrine_Core::getTable('sfGuardUser')->getProjectUsers($this->ei_project);
     //Méssages sur la description du sujet
     $this->subjectMessages = Doctrine_Core::getTable('EiSubjectMessage')->getMessages($this->subject_id, sfConfig::get("app_bug_description_message"));
     //On réccupère éventuellement le contexte de création du bug
     $this->ei_context = $this->ei_subject->getBugContextSubject()->getFirst();
     //Formulaire d'ajout d'un nouveau attachment
     $attach = new EiSubjectAttachment();
     $attach->setSubjectId($this->ei_subject->getId());
     $attach->setType(sfConfig::get('app_bug_attachment_description'));
     $attach->setAuthorId($this->guardUser->getId());
     $this->newAttachForm = new EiSubjectAttachmentForm($attach);
 }