Release 2.25 (#5109)

This commit is contained in:
Kevin Papst
2024-11-21 22:44:49 +01:00
committed by GitHub
parent 49eb7068c9
commit 0c26a2678e
261 changed files with 6431 additions and 7426 deletions

View File

@@ -13,6 +13,7 @@ use App\Entity\Project;
use App\Repository\ActivityRateRepository;
use App\Repository\ActivityRepository;
use App\Repository\ProjectRateRepository;
use App\Repository\Query\ActivityQuery;
final class ProjectDuplicationService
{
@@ -53,7 +54,11 @@ final class ProjectDuplicationService
$this->projectRateRepository->saveRate($newRate);
}
$allActivities = $this->activityRepository->findByProject($project);
$query = new ActivityQuery();
$query->addProject($project);
$query->setExcludeGlobals(true);
$allActivities = $this->activityRepository->getActivitiesForQuery($query);
foreach ($allActivities as $activity) {
$newActivity = clone $activity;
$newActivity->setProject($newProject);