From bbf5bab8532ff2d4eeae9fae64563d1728f47947 Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Thu, 12 Dec 2024 14:24:43 +0500 Subject: [PATCH] feat(project): store project id for tiket --- server/controllers/ticket/create.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/controllers/ticket/create.php b/server/controllers/ticket/create.php index ebe751ac..69d17e7d 100755 --- a/server/controllers/ticket/create.php +++ b/server/controllers/ticket/create.php @@ -46,6 +46,7 @@ class CreateController extends Controller { private $title; private $content; private $departmentId; + private $projectId; private $language; private $ticketNumber; private $email; @@ -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'); @@ -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(); @@ -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,