From 4f743a3a2ef7060daa03bc77bfceb47ea92ac0b1 Mon Sep 17 00:00:00 2001
From: Fabian Emilius Dear {{recipientName}}, there is a new thesis application submitted by {{student.firstName}} {{student.lastName}}. there is a new thesis application submitted by {{application.user.firstName}} {{application.user.lastName}}. We received the following thesis application details:
diff --git a/server/mail-templates/application-created-student.html b/server/mail-templates/application-created-student.html
index a7cb6f78..3555b61e 100644
--- a/server/mail-templates/application-created-student.html
+++ b/server/mail-templates/application-created-student.html
@@ -30,7 +30,7 @@
Desired Thesis Start Date:
- {{application.desiredThesisStart}}
+ {{application.desiredStartDate}}
Motivation:
diff --git a/server/mail-templates/thesis-assessment-added.html b/server/mail-templates/thesis-assessment-added.html
index 44f1f12e..1706d798 100644
--- a/server/mail-templates/thesis-assessment-added.html
+++ b/server/mail-templates/thesis-assessment-added.html
@@ -1,6 +1,6 @@
Dear {{recipientName}},
-An assessment has been added to thesis "{{thesis.thesisTitle}}"
+An assessment has been added to thesis "{{thesis.title}}"
Summary
diff --git a/server/mail-templates/thesis-closed.html b/server/mail-templates/thesis-closed.html
index 66e15e4c..2eec293e 100644
--- a/server/mail-templates/thesis-closed.html
+++ b/server/mail-templates/thesis-closed.html
@@ -1,6 +1,6 @@
Dear {{recipientName}},
-The thesis "{{thesis.thesisTitle}}" has been closed.
+The thesis "{{thesis.title}}" has been closed.
Full Details: {{thesisUrl}} diff --git a/server/mail-templates/thesis-comment-posted.html b/server/mail-templates/thesis-comment-posted.html index aa9e31d6..9a00f50e 100644 --- a/server/mail-templates/thesis-comment-posted.html +++ b/server/mail-templates/thesis-comment-posted.html @@ -1,6 +1,6 @@
Dear {{recipientName}},
-A comment has been added to thesis "{{thesis.thesisTitle}}"
+A comment has been added to thesis "{{thesis.title}}"
Message
diff --git a/server/mail-templates/thesis-created.html b/server/mail-templates/thesis-created.html
index 8ad63107..46aada29 100644
--- a/server/mail-templates/thesis-created.html
+++ b/server/mail-templates/thesis-created.html
@@ -11,5 +11,5 @@
Title
- {{thesis.thesisTitle}}
+ {{thesis.title}}
Dear {{recipientName}},
-The final grade has been added to your thesis "{{thesis.thesisTitle}}"
+The final grade has been added to your thesis "{{thesis.title}}"
Final Grade {{thesis.grade.finalGrade}}
- Positives
+ Feedback
{{thesis.grade.feedback}}
Dear {{recipientName}},
-The thesis "{{thesis.thesisTitle}}" has been submitted and is ready for review.
+The thesis "{{thesis.title}}" has been submitted and is ready for review.
The final thesis and presentation is attached to this email.
diff --git a/server/mail-templates/thesis-presentation-deleted.html b/server/mail-templates/thesis-presentation-deleted.html index 2a340c2a..d72a4988 100644 --- a/server/mail-templates/thesis-presentation-deleted.html +++ b/server/mail-templates/thesis-presentation-deleted.html @@ -1,6 +1,6 @@Dear {{recipientName}},
-A presentation scheduled at {{presentation.scheduledAt}}, has been cancelled for thesis "{{thesis.thesisTitle}}"
+A presentation scheduled at {{presentation.scheduledAt}}, has been cancelled for thesis "{{thesis.title}}"
Full Details: {{thesisUrl}} diff --git a/server/mail-templates/thesis-presentation-scheduled.html b/server/mail-templates/thesis-presentation-scheduled.html index 60e16c4f..e2ae5d4d 100644 --- a/server/mail-templates/thesis-presentation-scheduled.html +++ b/server/mail-templates/thesis-presentation-scheduled.html @@ -1,6 +1,6 @@
Dear {{recipientName}},
-A presentation has been scheduled for thesis "{{thesis.thesisTitle}}"
+A presentation has been scheduled for thesis "{{thesis.title}}"
Type
diff --git a/server/mail-templates/thesis-proposal-uploaded.html b/server/mail-templates/thesis-proposal-uploaded.html
index dc73ffc5..2640f517 100644
--- a/server/mail-templates/thesis-proposal-uploaded.html
+++ b/server/mail-templates/thesis-proposal-uploaded.html
@@ -1,7 +1,7 @@
Dear {{recipientName}},
- An proposal has been uploaded to thesis "{{thesis.thesisTitle}}". + An proposal has been uploaded to thesis "{{thesis.title}}". The proposal is attached to this email.
diff --git a/server/src/main/java/thesistrack/ls1/entity/TopicReviewer.java b/server/src/main/java/thesistrack/ls1/entity/TopicReviewer.java deleted file mode 100644 index 54525334..00000000 --- a/server/src/main/java/thesistrack/ls1/entity/TopicReviewer.java +++ /dev/null @@ -1,40 +0,0 @@ -package thesistrack.ls1.entity; - -import jakarta.persistence.*; -import jakarta.validation.constraints.NotNull; -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import thesistrack.ls1.entity.key.TopicReviewerId; - -import java.time.Instant; - -@Getter -@Setter -@Entity -@Table(name = "topic_reviewers") -public class TopicReviewer { - @EmbeddedId - private TopicReviewerId id; - - @MapsId("topicId") - @ManyToOne(fetch = FetchType.LAZY, optional = false) - @JoinColumn(name = "topic_id", nullable = false) - private Topic topic; - - @MapsId("userId") - @ManyToOne(fetch = FetchType.LAZY, optional = false) - @JoinColumn(name = "user_id", nullable = false) - private User user; - - @CreationTimestamp - @NotNull - @Column(name = "assigned_at", nullable = false) - private Instant assignedAt; - - @NotNull - @ManyToOne(fetch = FetchType.LAZY, optional = false) - @JoinColumn(name = "assigned_by", nullable = false) - private User assignedBy; - -} \ No newline at end of file diff --git a/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java b/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java index b93c227a..786a061c 100644 --- a/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java +++ b/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java @@ -148,7 +148,7 @@ public MailBuilder fillApplicationPlaceholders(Application application) { return Objects.requireNonNullElse(application.getThesisTitle(), ""); }); - formatters.put("application.desiredThesisStart", DataFormatter::formatDate); + formatters.put("application.desiredStartDate", DataFormatter::formatDate); formatters.put("application.user.enrolledAt", DataFormatter::formatDate); replaceDtoPlaceholders(ApplicationDto.fromApplicationEntity(application, false), "application", formatters); diff --git a/server/src/test/java/thesistrack/ls1/MailTest.java b/server/src/test/java/thesistrack/ls1/MailTest.java deleted file mode 100644 index a5253ae0..00000000 --- a/server/src/test/java/thesistrack/ls1/MailTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package thesistrack.ls1; - -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.ComponentScan; - -@ComponentScan(basePackages = "thesistrack.ls1") -class MailTest { - @Test - void testGreet() { - applicationRepository - - assertThat(result).isEqualTo("Hello, John!"); - } -} diff --git a/server/src/test/resources/application.yml b/server/src/test/resources/application.yml deleted file mode 100644 index 6604c6c4..00000000 --- a/server/src/test/resources/application.yml +++ /dev/null @@ -1,67 +0,0 @@ -logging: - level: - liquibase: INFO - -spring: - datasource: - url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thesis-track} - username: ${SPRING_DATASOURCE_USERNAME:thesis-track-postgres} - password: ${SPRING_DATASOURCE_PASSWORD:thesis-track-postgres} - driver-class-name: org.postgresql.Driver - liquibase: - change-log: db/changelog/db.changelog-master.xml - jpa: - hibernate: - ddl-auto: validate - show-sql: ${DEBUG_MODE:false} - properties: - hibernate: - dialect: org.hibernate.dialect.PostgreSQLDialect - format_sql: ${DEBUG_MODE:false} - security: - oauth2: - client: - registration: - keycloak: - client-id: ${KEYCLOAK_CLIENT_ID:thesis-track-app} - scope: openid - provider: - keycloak: - issuer-uri: ${KEYCLOAK_HOST:http://localhost:8081}/realms/${KEYCLOAK_REALM_NAME:thesis-track} - user-name-attribute: ${UNIVERSITY_ID_JWT_ATTRIBUTE:preferred_username} - resourceserver: - jwt: - jwk-set-uri: ${KEYCLOAK_HOST:http://localhost:8081}/realms/${KEYCLOAK_REALM_NAME:thesis-track}/protocol/openid-connect/certs - issuer-uri: ${KEYCLOAK_HOST:http://localhost:8081}/realms/${KEYCLOAK_REALM_NAME:thesis-track} - mail: - host: ${POSTFIX_HOST:localhost} - port: ${POSTFIX_PORT:25} - username: ${POSTFIX_USERNAME:} - password: ${POSTFIX_PASSWORD:} - properties: - mail: - transport: - protocol: smtp - smtp: - starttls: - enable: true - -thesis-track: - keycloak: - client-id: ${KEYCLOAK_CLIENT_ID:thesis-track-app} - university-id-jwt-attribute: ${UNIVERSITY_ID_JWT_ATTRIBUTE:preferred_username} - client: - host: ${CLIENT_HOST:http://localhost:3000} - mail: - enabled: ${MAIL_ENABLED:false} - sender: ${MAIL_SENDER:test@ios.ase.cit.tum.de} - signature: ${MAIL_SIGNATURE:} - workspace-url: ${MAIL_WORKSPACE_URL:https://slack.com} - bcc-recipients: ${MAIL_BCC_RECIPIENTS:} - mail-template-location: ${MAIL_TEMPLATE_FOLDER:/default-mail-templates} - storage: - upload-location: ${UPLOAD_FOLDER:uploads} - -server: - servlet: - context-path: /api