Merge branch '128-archived-project' into 'develop'
fix: 🐛 add error message for archived project
See merge request ldc-web/projets/support-web!135
This commit is contained in:
commit
eddeb4f7f6
1 changed files with 7 additions and 2 deletions
|
|
@ -754,8 +754,13 @@ class TicketController extends Controller
|
|||
{
|
||||
$userGitlabId = auth()->user()->gitlab_id;
|
||||
$gitlabRepoId = $ticket->site->gitlab_project_id;
|
||||
$description = \sprintf("%s<br>", $ticket->text);
|
||||
$cLabel = match ($ticket->type) {
|
||||
|
||||
if (GitLab::projects()->show($gitlabRepoId)['archived']) {
|
||||
return back()->with('error', \trans("Ce projet GitLab est archivé et ne peut pas être utilisé."));
|
||||
}
|
||||
|
||||
$description = \sprintf("%s<br>", $ticket->text);
|
||||
$cLabel = match ($ticket->type) {
|
||||
TicketTypeEnum::bug => 'c-bug,g-to-dispatch',
|
||||
TicketTypeEnum::evolution => 'c-feature',
|
||||
TicketTypeEnum::newsletter => 'c-feature,g-to-estimate',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue