Skip to content
Snippets Groups Projects
Commit 0a2c7fe7 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch 'service_2001255_hotfix2' into '2021.2.0'

[Projekt: xRM-Service][TicketNr.: 2001255][Mailbridge DocumentTemplate]

See merge request xrm/basic!1395
parents 7896d337 1d57d53d
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ TicketTemplateUtils.ticketTemplateColumnMapping = function(pColumn)
*
* @param {String} pTemplateId the id of the template for the ticket
*
* returns the answer mail document template if true
* returns the id of the template if true
*/
TicketTemplateUtils.checkIndividualAnswer = function (pTemplateId)
{
......@@ -116,12 +116,7 @@ TicketTemplateUtils.checkIndividualAnswer = function (pTemplateId)
.from("TICKETTEMPLATE")
.whereIfSet("TICKETTEMPLATE.TICKETTEMPLATEID",pTemplateId)
.and("TICKETTEMPLATE.INDIVIDUAL_ANSWER", $KeywordRegistry.ticketTemplateIndivAnswer$active())
.cell()
if (documentTemplateId)
{
var documentTemplateContent = DocumentTemplateUtils.getTemplate(documentTemplateId,false)
}
.cell()
return documentTemplateContent;
return documentTemplateId;
}
\ No newline at end of file
......@@ -667,14 +667,14 @@ TicketMailbridgeUtils.createTicket = function(pMailObject, pFilterResult, pInbox
eml.sender = mailRec || inboxUser;
eml.subject = ticketSub +" ["+ ticketCode +"]";
eml.body = answerMail.toString() + "\n"+ getSignatureWithoutPlaceholder(signature) ;
eml.body = DocumentTemplateUtils.getTemplate(answerMail) + "\n"+ DocumentTemplateUtils.getTemplate(signature) ;
eml.toRecipients = [persFrom];
// overwrite eml.body with individual answer, if individual answer template is set for the selected ticket template
var indiAns = TicketTemplateUtils.checkIndividualAnswer(ticketTemplateId[0]);
if(indiAns !="" && indiAns != undefined)
{
eml.body = indiAns.toString() + "\n"+ getSignatureWithoutPlaceholder(signature);
eml.body = DocumentTemplateUtils.getTemplate(indiAns) + "\n"+ DocumentTemplateUtils.getTemplate(signature);
}
// overwrite eml.sender with answer mail address, if answer mail address is set for the selected inbox
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment