mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-20240: Fixed issue with non-localized task title in notification email
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@56401 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -101,7 +101,7 @@ public class WorkflowNotificationUtils
|
|||||||
*/
|
*/
|
||||||
public void sendWorkflowAssignedNotificationEMail(
|
public void sendWorkflowAssignedNotificationEMail(
|
||||||
String taskId,
|
String taskId,
|
||||||
String taskType,
|
String taskTitle,
|
||||||
String description,
|
String description,
|
||||||
Date dueDate,
|
Date dueDate,
|
||||||
Integer priority,
|
Integer priority,
|
||||||
@@ -129,7 +129,7 @@ public class WorkflowNotificationUtils
|
|||||||
// Build the template args
|
// Build the template args
|
||||||
Map<String, Serializable>templateArgs = new HashMap<String, Serializable>(7);
|
Map<String, Serializable>templateArgs = new HashMap<String, Serializable>(7);
|
||||||
templateArgs.put(ARG_WF_ID, taskId);
|
templateArgs.put(ARG_WF_ID, taskId);
|
||||||
templateArgs.put(ARG_WF_TITLE, taskType);
|
templateArgs.put(ARG_WF_TITLE, taskTitle);
|
||||||
templateArgs.put(ARG_WF_DESCRIPTION, description);
|
templateArgs.put(ARG_WF_DESCRIPTION, description);
|
||||||
if (dueDate != null)
|
if (dueDate != null)
|
||||||
{
|
{
|
||||||
|
@@ -34,7 +34,6 @@ import java.util.Set;
|
|||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.model.WCMModel;
|
import org.alfresco.model.WCMModel;
|
||||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||||
import org.alfresco.repo.workflow.jbpm.JBPMEngine;
|
|
||||||
import org.alfresco.service.cmr.avmsync.AVMDifference;
|
import org.alfresco.service.cmr.avmsync.AVMDifference;
|
||||||
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
@@ -978,13 +977,11 @@ public class WorkflowServiceImpl implements WorkflowService
|
|||||||
{
|
{
|
||||||
workflowDefId = workflowDefId.substring(workflowDefId.indexOf('$') + 1);
|
workflowDefId = workflowDefId.substring(workflowDefId.indexOf('$') + 1);
|
||||||
}
|
}
|
||||||
String taskDefId = task.getDefinition().getId().replace(":", "_");
|
|
||||||
String taskType = workflowDefId + "." + (engineId.equals(JBPMEngine.ENGINE_ID) ? "type" : "task") + "." + taskDefId;
|
|
||||||
|
|
||||||
// Send the notification
|
// Send the notification
|
||||||
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
||||||
taskId,
|
taskId,
|
||||||
taskType,
|
null,
|
||||||
assignee,
|
assignee,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
@@ -129,22 +129,19 @@ public class TaskCreateListener implements TaskListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
String title;
|
String title;
|
||||||
if (taskFormKey != null)
|
if (task.getName() != null)
|
||||||
{
|
{
|
||||||
title = taskFormKey.replace(":", "_");
|
title = task.getName();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
title = task.getName().replaceAll(" ", "_");
|
title = taskFormKey.replace(":", "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send email notification
|
// Send email notification
|
||||||
String workflowDefId = task.getProcessDefinitionId().split(":")[0];
|
|
||||||
String taskType = workflowDefId + ".task." + title + ".title";
|
|
||||||
|
|
||||||
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
||||||
ActivitiConstants.ENGINE_ID + "$" + task.getId(),
|
ActivitiConstants.ENGINE_ID + "$" + task.getId(),
|
||||||
taskType,
|
title,
|
||||||
task.getDescription(),
|
task.getDescription(),
|
||||||
task.getDueDate(),
|
task.getDueDate(),
|
||||||
Integer.valueOf(task.getPriority()),
|
Integer.valueOf(task.getPriority()),
|
||||||
|
Reference in New Issue
Block a user