WIP: Assign supervisor to student ideas no matter if target (goal) is reached #96

Draft
tozh4728 wants to merge 5 commits from 67-supervisor-target-non-blocking into develop
Showing only changes of commit ce6b5aabdb - Show all commits

View File

@ -207,16 +207,22 @@ public abstract class AbstractAdminIdeaPanel extends Panel {
} else { } else {
ideaService.changeSupervisor(idea, newSelection, SciProSession.get().getUser()); ideaService.changeSupervisor(idea, newSelection, SciProSession.get().getUser());
Target currentTarget = targetService.findOne(idea.getApplicationPeriod(), newSelection, Target currentTarget = targetService.findOne(
idea.getProjectType()); idea.getApplicationPeriod(),
Long countMatched = ideaService.countMatched(idea.getApplicationPeriod(), newSelection, newSelection,
idea.getProjectType()); idea.getProjectType()
);
Long countMatched = ideaService.countMatched(
idea.getApplicationPeriod(),
newSelection,
idea.getProjectType()
);
int targetCounter = (currentTarget == null) ? 0 : currentTarget.getTarget(); int targetCounter = (currentTarget == null) ? 0 : currentTarget.getTarget();
long matchedCounter = (countMatched == null) ? 0L : countMatched; long matchedCounter = (countMatched == null) ? 0L : countMatched;
String msg = "Supervisor changed: matched/target -> " + matchedCounter + " / " + String msg =
targetCounter; "Supervisor changed: matched/target -> " + matchedCounter + " / " + targetCounter;
if (matchedCounter > targetCounter) { if (matchedCounter > targetCounter) {
warn(msg); warn(msg);