Opraveno ukládání požadavků pokud nejsou v globálním nastavení nastaveny

šablony e-mailů.
multitenant
Josef Rokos 10 years ago
parent 50ee0215c0
commit e9254b7ad6

@ -27,6 +27,10 @@ public class EntityMessageBuilder implements MessageBuilder {
}
private String replaceProperties(String src, Object data) {
if (src == null) {
return "";
}
int current = 0;
List<String> properties = new ArrayList<String>();
boolean found = false;

@ -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);
}
}
}

Loading…
Cancel
Save