|
|
|
@ -100,25 +100,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
|
wg = e.getWorkgroup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
workgroupService.loadMembers(wg);
|
|
|
|
|
|
|
|
|
|
for (JobMapping jm : wg.getMembers())
|
|
|
|
|
{
|
|
|
|
@ -223,13 +205,16 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
|
if (e.getOwnedBy().getEmail() != null
|
|
|
|
|
&& !e.getOwnedBy().getEmail().isEmpty()
|
|
|
|
|
&& e.getOwnedBy().isNotify()) {
|
|
|
|
|
if (e.getState() == RequirementState.APPROVED) {
|
|
|
|
|
if (e.getState() == RequirementState.APPROVED && settings.getConfReqTemplate() != null) {
|
|
|
|
|
message = messageBuilder.buildMessage(settings.getConfReqTemplate(), e);
|
|
|
|
|
} else {
|
|
|
|
|
} else if (settings.getAuthReqTemplate() != null) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|