2401 Only write examiners comment if it's new
This commit is contained in:
parent
99a002a628
commit
d359056cc6
13
daisy-integration/src/main/java/se/su/dsv/scipro/integration/daisy/workers/RejectedThesisWorker.java
13
daisy-integration/src/main/java/se/su/dsv/scipro/integration/daisy/workers/RejectedThesisWorker.java
@ -57,12 +57,13 @@ public class RejectedThesisWorker extends AbstractWorker {
|
||||
final FinalThesis finalThesis = finalThesisService.findByProject(project);
|
||||
if (finalThesis != null && finalThesis.getStatus() != FinalThesis.Status.REJECTED && finalThesis.getLastModified().before(rejectedDate)) {
|
||||
finalThesisService.reject(project);
|
||||
if (thesisRejection.isVisibleToAuthors()) {
|
||||
projectForumService.createThread(project, null,
|
||||
"Thesis rejected by examiner",
|
||||
"This is an automated message generated by the system.\n\nThe following comment was provided by the examiner. Consult with your supervisor what actions to take from here.\n\n" + thesisRejection.getMessage(),
|
||||
Collections.emptySet());
|
||||
}
|
||||
}
|
||||
// Check dates here since the API call is only date-based rather than time as well.
|
||||
if (thesisRejection.isVisibleToAuthors() && rejectedDate.after(getLastSuccessfulRun())) {
|
||||
projectForumService.createThread(project, null,
|
||||
"Thesis rejected by examiner",
|
||||
"This is an automated message generated by the system.\n\nThe following comment was provided by the examiner. Consult with your supervisor what actions to take from here.\n\n" + thesisRejection.getMessage(),
|
||||
Collections.emptySet());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user