Fix certain milestones not getting activated #54

Merged
niat8586 merged 2 commits from milestones-not-activating into develop 2024-12-16 14:20:42 +01:00
2 changed files with 36 additions and 0 deletions

View File

@ -96,6 +96,7 @@ import se.su.dsv.scipro.match.TargetRepository;
import se.su.dsv.scipro.match.TargetServiceImpl; import se.su.dsv.scipro.match.TargetServiceImpl;
import se.su.dsv.scipro.milestones.MilestoneActivityTemplateRepository; import se.su.dsv.scipro.milestones.MilestoneActivityTemplateRepository;
import se.su.dsv.scipro.milestones.service.ActivateCompletedMilestonesOnNewProjects; import se.su.dsv.scipro.milestones.service.ActivateCompletedMilestonesOnNewProjects;
import se.su.dsv.scipro.milestones.service.MilestoneActivator;
import se.su.dsv.scipro.milestones.service.MilestoneActivityTemplateService; import se.su.dsv.scipro.milestones.service.MilestoneActivityTemplateService;
import se.su.dsv.scipro.milestones.service.impl.MilestoneActivityTemplateServiceImpl; import se.su.dsv.scipro.milestones.service.impl.MilestoneActivityTemplateServiceImpl;
import se.su.dsv.scipro.milestones.service.impl.MilestonePhaseTemplateServiceImpl; import se.su.dsv.scipro.milestones.service.impl.MilestonePhaseTemplateServiceImpl;
@ -1129,4 +1130,21 @@ public class CoreConfig {
public GroupFacadeImpl groupFacade() { public GroupFacadeImpl groupFacade() {
return new GroupFacadeImpl(); return new GroupFacadeImpl();
} }
@Bean
public MilestoneActivator milestoneActivator(
EventBus eventBus,
MilestoneServiceImpl milestoneService,
MilestoneActivityTemplateService milestoneActivityTemplateService,
FinalSeminarService finalSeminarService,
NotificationController notificationController
) {
return new MilestoneActivator(
milestoneActivityTemplateService,
milestoneService,
eventBus,
finalSeminarService,
notificationController
);
}
} }

View File

@ -0,0 +1,18 @@
package se.su.dsv.scipro.test;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import se.su.dsv.scipro.milestones.service.MilestoneActivator;
public class BeanDefinitionsTest extends IntegrationTest {
@Inject
MilestoneActivator milestoneActivator;
@Test
public void milestone_activator() {
assertNotNull(milestoneActivator);
}
}