Workflow notification subject not working

I want to modify the notifyMentionedUser workflow to remove "[YouTrack, @Mention" from the subject line, but all emails still have this in the subject. I restarted the server just to be sure some cache wasn't hanging around. This is the workflow as it is displayed on the admin page (and is the same in the editor):
ruleNotify user if comment contains @username
 
whencomments.added.isNotEmpty{
varseparators="`!#%^&*()=[]{}:;'\"\\|,<>/?\n\r\t";
varmentionedUsers=" ";
 
varmyComment=comments.added.first;
varoriginalText=myComment.text;
vartext=" "+originalText.lowerCase+" ";
 
varusername=" ";
varuser=loggedInUser;
varindex=-1;
 
index=text.indexOf("@",opts);
 
while(index!=-1){
index=index+1;
username=" ";
 
varnextSymbol=text.substring(index,index+1);
while(!separators.contains(nextSymbol,opts)){
username=username+nextSymbol;
index=index+1;
nextSymbol=text.substring(index,index+1);
}
 
if(username.endsWith(".",opts)){
username=username.substringOfLength(username.length-1,opts);
}
 
debug("Extracted @username: |"+username+"|");
if(username.isNotEmpty){
user=project.getUser(username);
 
if(user!=null&&!mentionedUsers.contains("@"+user.login+",",ignoreCase)&&(user.isInGroup(permittedGroup.name)||permittedGroup==null||user==reporter)&&(myComment.permittedGroup==null||user.isInGroup(myComment.permittedGroup.name))){
user.notify(
l10n({
getId( )}{
summary})
,
l10n(<p style="font-size:14px; font-family: sans-serif; color:#000000; margin:14px 0 19px 44px">You were mentioned in the comment by <b>{
myComment.author.fullName}</b> in project{
project.name}at{
myComment.created.format(mediumDateTime)}</p><table style="border-collapse: collapse; width: 100%; table-layout: fixed;">    <tbody>    <tr>        <td style="padding:12px 15px; background:#f0f0f0">            <table style="border-collapse: collapse; border: 0; width: 100%;"> <tbody> <tr>     <td style="vertical-align: top; font-family:sans-serif; font-size: 13px;"><a title="YouTrack" style="float:left; margin-right:6px; font-size: 15px; color: #1466c6; text-decoration: none;" href="{
getUrl( )}">{
getId( )}"</a> <a style="font-size: 15px; color: #1466c6; text-decoration: none;" href="{
getUrl( )}">{
summary}</a>     </td> </tr> </tbody>            </table>        </td>    </tr>    </tbody></table></p><table style="width: 100%; border-collapse: collapse; border: 0;"><tr><td style="padding: 10px 0 10px 10px; vertical-align: top; font-family:sans-serif; font-size:13px; background:#f0f0f0; border-top: 8px solid #ffffff;">{
wikify(originalText)}</td></tr></table><p style="color: gray;font-size: 12px;margin-top: 1em;border-top: 1px solid #D4D5D6">You (<b>{
user.login}</b>) received this message because you've been mentioned in the comment.Sincerely yours, YouTrack</p>)
,true);
mentionedUsers=mentionedUsers+"@"+user.login+",";
}
}
 
text=text.substringRelative("@"+username,pos:after);
index=text.indexOf("@",opts);
}
}


and a test email:
2014-09-05 08_21_40-[YouTrack, @Mention] Issue TEST-104_ asdf - Message (HTML).png


Exported workflow is also attached: jetbrains-youtrack-notifyMentionedUser.zip (11KB)

What do I need to change in the workflow to make this work as desired?
0
1 comment
To make changes in localized strings please remove l10n() expression completely and provide your own instead. Please look at this reference for details.
0

Please sign in to leave a comment.