Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Email notification template in RTC.

Hi,


I am using CLM 5.0.1.
I have created 2 different email templates, one email template for all work item state change except state In progress to completed and 2nd email template for state change In progress to completed.
Is there any possibility to send mail for state change notification using 2 different email template?


0 votes



2 answers

Permanent link
No, only one template can be configured for work item change notification.  Same is the case with other events, each event has one template associated.

The scenario you describe seems like you do need a notification on both cases but the content you wish to include is specific to the cases.  You can customize the template to generate different content based on the conditions you have.

 

A simple if else clause could be used to get it. There are a set of variables you can use with Velocity syntax. 
 
To get the work item state, use :
${workItem.state}
a simple if clause would look like this :
#if($foo == $bar)it's true!#{else}it's not!#end
For more details, you can refer to this Reference section from CLM Help, here is a quick link for you :

hope this helps

0 votes


Permanent link

 Hi Dinesh,


             Actually I want to send mail for state change notification when 1. state change in progress to complete and  2.  state change except state In progress to completed.  As per above instruction I used "if else", but getting error.

I used below template   :

<html>  <body> 
#if( ${workItem.state} == "Completed" )   #set($workItem.get("channelstatus")="Dropped")#end 
A new form (CM):${workItem.title}(${workItem.identifier}) has been modified on ${workItem.created.fullDate} ${workItem.created.fullTime} India Standard Time. Please provide all necessary inputs.
<br>Requirement originator :${workItem.owner}</br>
<br>State of request : ${workItem.state}</br>
<br>Title of the  request :${workItem.title}</br>  
<br>email ID:#if(${change.contributor.emailAddress})&nbsp;${change.contributor.emailAddress}#end </br>#end
#else( ${workItem.state} == "draft" ) 
A new channel master form (CM):${workItem.title}(${workItem.identifier}) has been created on ${workItem.created.fullDate} ${workItem.created.fullTime} India Standard Time. Please provide all necessary inputs.
<br>Requirement originator :${workItem.owner}</br>
<br>State of request : ${workItem.state}</br>
<br>Title of the  request :${workItem.title}</br>  
<br>email ID:#if(${change.contributor.emailAddress})&nbsp;${change.contributor.emailAddress}#end </br>#end 
</body></html>

   Error:  
Parse error
Encountered "#end\n" at line 8, column 103 of template 
Was expecting one of: 
<EOF> 
"(" ... 
<RPAREN> ... 
<ESCAPE_DIRECTIVE> ... 
<SET_DIRECTIVE> ... 
"##" ... 
"\\" ... 
"\" ... 
<TEXT> ... 
"#" ... 
"
#" ... 
<STRING_LITERAL> ... 
<IF_DIRECTIVE> ... 
<STOP_DIRECTIVE> ... 
<INTEGER_LITERAL> ... 
<FLOATING_POINT_LITERAL> ... 
<WORD> ... 
<BRACKETED_WORD> ... 
<IDENTIFIER> ... 
<DOT> ... 
"{" ... 
"}" ... 

0 votes

Comments

please check the line 8, column 103 of your template code.. its not in right form... there #end which is not right at that place... please refer to the velocity syntax, there is more to change in the template...

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,381

Question asked: Aug 22 '18, 7:10 a.m.

Question was seen: 2,125 times

Last updated: Oct 01 '18, 12:45 p.m.

Confirmation Cancel Confirm