IDEMPIERE-5261 Workflow EMail notification enhancement (#2102)

- add @_noDocInfo_@ variable to allow sending the email without adding extra information
This commit is contained in:
Carlos Ruiz 2023-11-10 20:17:01 +01:00 committed by GitHub
parent 75cabfbd39
commit aecc0e3e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -1814,15 +1814,14 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
//
String subject = null;
String raw = text.getMailHeader(false);
int first = raw != null ? raw.indexOf("@") : -1;
if (raw != null && first >= 0 && raw.indexOf("@", first) > first)
subject = text.getMailHeader();
if (raw != null && raw.contains("@_noDocInfo_@"))
subject = text.getMailHeader().replaceAll("@_noDocInfo_@", "");
else
subject = doc.getDocumentInfo() + ": " + text.getMailHeader();
String message = null;
raw = text.getMailText(true, false);
if (raw != null && (raw.contains("@=DocumentInfo") || raw.contains("@=documentInfo")
|| raw.contains("@=Summary") || raw.contains("@=summary")))
|| raw.contains("@=Summary") || raw.contains("@=summary") || raw.contains("@_noDocInfo_@")))
message = text.getMailText(true);
else
message = text.getMailText(true)