|
|
@ -100,25 +100,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
wg = e.getWorkgroup();
|
|
|
|
wg = e.getWorkgroup();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
workgroupService.loadMembers(wg);
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (wg.getMembers() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new LazyInitializationException("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wg.getMembers().size();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (LazyInitializationException ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Query q = dao.getQuery("from Workgroup where id = :id");
|
|
|
|
|
|
|
|
q.setParameter("id", wg.getId());
|
|
|
|
|
|
|
|
wg = (Workgroup) q.uniqueResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wg.getMembers().size();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (JobMapping jm : wg.getMembers())
|
|
|
|
for (JobMapping jm : wg.getMembers())
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -223,13 +205,16 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
if (e.getOwnedBy().getEmail() != null
|
|
|
|
if (e.getOwnedBy().getEmail() != null
|
|
|
|
&& !e.getOwnedBy().getEmail().isEmpty()
|
|
|
|
&& !e.getOwnedBy().getEmail().isEmpty()
|
|
|
|
&& e.getOwnedBy().isNotify()) {
|
|
|
|
&& e.getOwnedBy().isNotify()) {
|
|
|
|
if (e.getState() == RequirementState.APPROVED) {
|
|
|
|
if (e.getState() == RequirementState.APPROVED && settings.getConfReqTemplate() != null) {
|
|
|
|
message = messageBuilder.buildMessage(settings.getConfReqTemplate(), e);
|
|
|
|
message = messageBuilder.buildMessage(settings.getConfReqTemplate(), e);
|
|
|
|
} else {
|
|
|
|
} else if (settings.getAuthReqTemplate() != null) {
|
|
|
|
message = messageBuilder.buildMessage(settings.getAuthReqTemplate(), e);
|
|
|
|
message = messageBuilder.buildMessage(settings.getAuthReqTemplate(), e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
message.setTo(e.getOwnedBy().getEmail());
|
|
|
|
|
|
|
|
mailer.send(message);
|
|
|
|
if (message != null) {
|
|
|
|
|
|
|
|
message.setTo(e.getOwnedBy().getEmail());
|
|
|
|
|
|
|
|
mailer.send(message);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|