copy teams from logged-in user for new projects (#3599)

This commit is contained in:
Kevin Papst
2022-10-25 16:31:34 +02:00
committed by GitHub
parent 8b4828f236
commit 78749ad3b4
14 changed files with 376 additions and 268 deletions

View File

@@ -38,6 +38,7 @@ use App\Repository\ProjectRepository;
use App\Repository\Query\ActivityQuery;
use App\Repository\Query\ProjectQuery;
use App\Repository\TeamRepository;
use App\Utils\Context;
use Pagerfanta\Pagerfanta;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -166,7 +167,7 @@ final class ProjectController extends AbstractController
if ($editForm->isSubmitted() && $editForm->isValid()) {
try {
$this->projectService->saveNewProject($project);
$this->projectService->saveNewProject($project, new Context($this->getUser()));
$this->flashSuccess('action.update.success');
return $this->redirectToRoute('project_details', ['id' => $project->getId()]);