To customize the email sent when canceling, pausing or reassigning a case or sending a case note, go to
Admin > Languages, and select your language, then click on
Export. Then edit the downloaded
processmaker.LANG.po file with PoEdit. Change the following phrases:
- ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION: "A note has been added to the case." (the subject line of the email)
- ID_CASE_CANCEL_LABEL_NOTE: "The case was canceled due to:" (text prefacing the reason given by the user for canceling the case)
- ID_CASE_PAUSE_LABEL_NOTE: "The case was paused due to:" (text prefacing the reason given by the user for pausing the case)
After saving the
.po file, return to ProcessMaker and go to
Admin > Languages. Click on
Import to upload the modified
.po file.
Note: If needing to alter more of the body of the note when canceling a case, edit the value of the variable
noteReasonTxt, found on line 937 of
workflow/engine/templates/cases/open.js:
Code: Select all var noteReasonTxt = _('ID_CASE_CANCEL_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
To alter the note when pausing a case, edit the value of the variable
noteReasonTxt on line 1384 in the same file:
Code: Select all var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
To alter the note when reassigning a case, edit the value of
NOTE_REASON on line 1210 in the same file:
Code: Select all params : {action : 'reassignCase', USR_UID: rowSelected.data.USR_UID, NOTE_REASON: Ext.getCmp('idTextareaReason').getValue(), NOTIFY_REASSIGN: Ext.getCmp('idCheckboxReason').getValue()},
To alter the subject line and body of case notes, edit lines 169-170 in
workflow/engine/classes/model/AppNotes.php:
Code: Select all $configNoteNotification['subject'] = G::LoadTranslation( 'ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION' ) . " @#APP_TITLE ";
$configNoteNotification['body'] = G::LoadTranslation( 'ID_CASE' ) . ": @#APP_TITLE<br />" . G::LoadTranslation( 'ID_AUTHOR' ) . ": $authorName<br /><br />$noteContent";
Then,
clear ProcessMaker's cache.
To send a message when a password is changed, you can add code after line 202 in
workflow/engine/methods/users/users_Save.php:
Code: Select all $aUserProperty['USR_PASSWORD_HISTORY'] = serialize( $aHistory );
$oUserProperty->update( $aUserProperty );
//add code here to call PMFSendMessage()
}