feat: [pm] 이슈에 팀/담당자/고객사 필드 추가
- DB 마이그레이션: 하이브리드 FK + 문자열 필드 방식 - Model: fillable, casts, relationships, accessor 추가 - FormRequest: validation rules 추가 (Store/Update) - ImportService: JSON import 시 새 필드 처리 - UI: 이슈 모달에 입력 필드 추가 - UI: 작업 탭 아코디언에 고객사·부서·담당자 표시 - 이슈 저장 후 작업 탭 즉시 갱신
This commit is contained in:
@@ -60,6 +60,16 @@ public function importFromJson(array $data): array
|
||||
'description' => $issueData['description'] ?? null,
|
||||
'type' => $issueData['type'] ?? AdminPmIssue::TYPE_BUG,
|
||||
'status' => $issueData['status'] ?? AdminPmIssue::STATUS_OPEN,
|
||||
'start_date' => $issueData['start_date'] ?? null,
|
||||
'due_date' => $issueData['due_date'] ?? null,
|
||||
'estimated_hours' => $issueData['estimated_hours'] ?? null,
|
||||
'is_urgent' => $issueData['is_urgent'] ?? false,
|
||||
// 팀/담당자/고객사 (하이브리드)
|
||||
'department_id' => $issueData['department_id'] ?? null,
|
||||
'team' => $issueData['team'] ?? null,
|
||||
'assignee_id' => $issueData['assignee_id'] ?? null,
|
||||
'assignee_name' => $issueData['assignee_name'] ?? null,
|
||||
'client' => $issueData['client'] ?? null,
|
||||
'created_by' => auth()->id(),
|
||||
]);
|
||||
$result['issues_count']++;
|
||||
@@ -109,6 +119,16 @@ public function importTasksToProject(int $projectId, array $tasks): array
|
||||
'description' => $issueData['description'] ?? null,
|
||||
'type' => $issueData['type'] ?? AdminPmIssue::TYPE_BUG,
|
||||
'status' => $issueData['status'] ?? AdminPmIssue::STATUS_OPEN,
|
||||
'start_date' => $issueData['start_date'] ?? null,
|
||||
'due_date' => $issueData['due_date'] ?? null,
|
||||
'estimated_hours' => $issueData['estimated_hours'] ?? null,
|
||||
'is_urgent' => $issueData['is_urgent'] ?? false,
|
||||
// 팀/담당자/고객사 (하이브리드)
|
||||
'department_id' => $issueData['department_id'] ?? null,
|
||||
'team' => $issueData['team'] ?? null,
|
||||
'assignee_id' => $issueData['assignee_id'] ?? null,
|
||||
'assignee_name' => $issueData['assignee_name'] ?? null,
|
||||
'client' => $issueData['client'] ?? null,
|
||||
'created_by' => auth()->id(),
|
||||
]);
|
||||
$result['issues_count']++;
|
||||
@@ -143,8 +163,19 @@ public function getSampleTemplate(): array
|
||||
[
|
||||
'title' => '이슈 1',
|
||||
'description' => '이슈 설명',
|
||||
'type' => 'bug',
|
||||
'type' => 'feature',
|
||||
'status' => 'open',
|
||||
'start_date' => date('Y-m-d'),
|
||||
'due_date' => date('Y-m-d', strtotime('+1 week')),
|
||||
'estimated_hours' => 8,
|
||||
'is_urgent' => false,
|
||||
// 방법 1: FK 연동 (DB에 존재하는 ID)
|
||||
'department_id' => null,
|
||||
'assignee_id' => null,
|
||||
// 방법 2: 문자열 직접 입력 (연동 없이)
|
||||
'team' => '개발팀',
|
||||
'assignee_name' => '홍길동',
|
||||
'client' => '경동기업',
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -188,4 +219,4 @@ public function validateJsonStructure(array $data): array
|
||||
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user