feat: Close #78 - Add Create Gitlab issue for newsletter too
This commit is contained in:
parent
af1c739f72
commit
bf6f35fdb1
2 changed files with 2 additions and 3 deletions
|
|
@ -752,7 +752,7 @@ class TicketController extends Controller
|
|||
$description = \sprintf("%s<br>", $ticket->text);
|
||||
$cLabel = match ($ticket->type) {
|
||||
TicketTypeEnum::bug => 'c-bug',
|
||||
TicketTypeEnum::evolution => 'c-feature',
|
||||
TicketTypeEnum::evolution, TicketTypeEnum::newsletter => 'c-feature',
|
||||
};
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -284,12 +284,11 @@ class TicketPolicy
|
|||
public function createGitlabIssue(User $user, Ticket $ticket)
|
||||
{
|
||||
return $user->role->equals(RoleEnum::developper)
|
||||
&& ($ticket->type->equals(TicketTypeEnum::bug) || $ticket->type->equals(TicketTypeEnum::evolution))
|
||||
&& ($ticket->type->equals(TicketTypeEnum::bug) || $ticket->type->equals(TicketTypeEnum::evolution) || $ticket->type->equals(TicketTypeEnum::newsletter))
|
||||
&& !\is_null($ticket->site->gitlab_project_id)
|
||||
&& \is_null($ticket->gitlab_issue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if the user can changeOrder
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue