Fix some remaining issues from the Spring migration #20

Merged
niat8586 merged 14 commits from release-firefighting into develop 2024-11-20 12:56:22 +01:00
4 changed files with 9 additions and 0 deletions
Showing only changes of commit fc06c48456 - Show all commits

View File

@ -22,12 +22,14 @@ public class ReportServiceImpl extends AbstractServiceImpl<Report, Long> impleme
}
@Override
@Transactional
public AttachmentReport submit(AttachmentReport report) {
report.submit();
return save(report);
}
@Override
@Transactional
public void save(AttachmentReport report, Optional<FileUpload> fileUpload) {
storeReportFile(report, fileUpload);
save(report);

View File

@ -49,6 +49,7 @@ public class ReviewerInteractionServiceImpl implements ReviewerInteractionServic
}
@Override
@Transactional
public ForumPost reply(final Project project, final User user, final String content, final Set<Attachment> attachments) {
ReviewerThread reviewerThread = getReviewerThread(project);
ForumPost reply = forumService.createReply(reviewerThread.getForumThread(), user, content, attachments);

View File

@ -7,6 +7,7 @@ import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.core.types.dsl.LiteralExpression;
import com.querydsl.jpa.impl.JPAQuery;
import jakarta.transaction.Transactional;
import se.su.dsv.scipro.file.FileReference;
import se.su.dsv.scipro.file.FileService;
import se.su.dsv.scipro.file.FileUpload;
@ -92,6 +93,7 @@ public class ReviewingServiceImpl extends AbstractServiceImpl<ReviewerApproval,
}
@Override
@Transactional
public void reject(final ReviewerApproval reviewerApproval, final String reason, final Optional<FileUpload> feedback) {
Optional<FileReference> feedbackFile = store(feedback);
reviewerApproval.reject(reason, feedbackFile);
@ -106,6 +108,7 @@ public class ReviewingServiceImpl extends AbstractServiceImpl<ReviewerApproval,
}
@Override
@Transactional
public void approve(final ReviewerApproval process, final String reason, final Optional<FileUpload> feedback) {
Optional<FileReference> feedbackFile = store(feedback);
process.approve(reason, feedbackFile);

View File

@ -3,6 +3,8 @@ package se.su.dsv.scipro.system;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.persistence.EntityManager;
import jakarta.transaction.Transactional;
import java.util.Comparator;
import java.util.List;
@ -13,6 +15,7 @@ public class ResearchAreaServiceImpl extends AbstractServiceImpl<ResearchArea,Lo
}
@Override
@Transactional
public ResearchArea updateExternalResearchArea(Long identifier, String name, final boolean active) {
ResearchArea ra = new ResearchArea();
if (identifier != null) {