feat: ✨ allow creating gitlab issues for mailing type
This commit is contained in:
parent
6c783247a7
commit
ab998c975d
2 changed files with 5 additions and 2 deletions
|
|
@ -762,13 +762,15 @@ class TicketController extends Controller
|
|||
$description = \sprintf("%s<br>", $ticket->text);
|
||||
$cLabel = match ($ticket->type) {
|
||||
TicketTypeEnum::bug => 'c-bug,g-to-dispatch',
|
||||
TicketTypeEnum::evolution => 'c-feature',
|
||||
TicketTypeEnum::evolution,
|
||||
TicketTypeEnum::mailing => 'c-feature',
|
||||
TicketTypeEnum::newsletter => 'c-feature,g-to-estimate',
|
||||
};
|
||||
|
||||
$assigneeId = match ($ticket->type) {
|
||||
TicketTypeEnum::bug => $userGitlabId,
|
||||
TicketTypeEnum::evolution,
|
||||
TicketTypeEnum::mailing,
|
||||
TicketTypeEnum::newsletter => $ticket->site->projectManager?->gitlab_id
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -287,7 +287,8 @@ class TicketPolicy
|
|||
$ticket->type->equals(TicketTypeEnum::bug)
|
||||
|| $ticket->type->equals(TicketTypeEnum::evolution)
|
||||
|| $ticket->type->equals(TicketTypeEnum::newsletter)
|
||||
)
|
||||
|| $ticket->type->equals(TicketTypeEnum::mailing)
|
||||
)
|
||||
&& !\is_null($ticket->site->gitlab_project_id)
|
||||
&& \is_null($ticket->gitlab_issue);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue