Skip to content

Commit

Permalink
feat(project): store project id for tiket
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Dec 12, 2024
1 parent 2e9bf27 commit bbf5bab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/controllers/ticket/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CreateController extends Controller {
private $title;
private $content;
private $departmentId;
private $projectId;
private $language;
private $ticketNumber;
private $email;
Expand Down Expand Up @@ -102,6 +103,7 @@ public function handler() {
$this->title = Controller::request('title', true);
$this->content = Controller::request('content', true);
$this->departmentId = Controller::request('departmentId');
$this->projectId = Controller::request('projectId');
$this->language = Controller::request('language');
$this->email = Controller::request('email');
$this->name = Controller::request('name');
Expand Down Expand Up @@ -173,6 +175,7 @@ private function createNewUser() {
}

private function storeTicket() {
$project = Department::getDataStore($this->projectId);
$department = Department::getDataStore($this->getCorrectDepartmentId());
$author = $this->getAuthor();
$this->language = $this->getCorrectLanguage();
Expand All @@ -190,6 +193,7 @@ private function storeTicket() {
'content' => $this->replaceWithImagePaths($imagePaths, $this->content),
'language' => $this->language,
'department' => $department,
'project' => $project,
'file' => ($fileUploader instanceof FileUploader) ? $fileUploader->getFileName() : null,
'date' => Date::getCurrentDate(),
'unread' => false,
Expand Down

0 comments on commit bbf5bab

Please sign in to comment.