WIP: Assign supervisor to student ideas no matter if target (goal) is reached #96
@ -207,16 +207,22 @@ public abstract class AbstractAdminIdeaPanel extends Panel {
|
||||
} else {
|
||||
ideaService.changeSupervisor(idea, newSelection, SciProSession.get().getUser());
|
||||
|
||||
Target currentTarget = targetService.findOne(idea.getApplicationPeriod(), newSelection,
|
||||
idea.getProjectType());
|
||||
Long countMatched = ideaService.countMatched(idea.getApplicationPeriod(), newSelection,
|
||||
idea.getProjectType());
|
||||
Target currentTarget = targetService.findOne(
|
||||
idea.getApplicationPeriod(),
|
||||
newSelection,
|
||||
idea.getProjectType()
|
||||
);
|
||||
Long countMatched = ideaService.countMatched(
|
||||
idea.getApplicationPeriod(),
|
||||
newSelection,
|
||||
idea.getProjectType()
|
||||
);
|
||||
|
||||
int targetCounter = (currentTarget == null) ? 0 : currentTarget.getTarget();
|
||||
long matchedCounter = (countMatched == null) ? 0L : countMatched;
|
||||
|
||||
String msg = "Supervisor changed: matched/target -> " + matchedCounter + " / " +
|
||||
targetCounter;
|
||||
String msg =
|
||||
"Supervisor changed: matched/target -> " + matchedCounter + " / " + targetCounter;
|
||||
|
||||
if (matchedCounter > targetCounter) {
|
||||
warn(msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user