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 {
|
} 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user