How to replace work item type value with a different value
Hi,
I would like to replace the "Type: Task" to "Type:TSK" in my email template subject. This is my idea below:
<script>
function myFunction() {
var task = "TSK";
var Defect= "DFT";
}
</script>
#if(${workItem.type} == "Task") myFunction(Defect) #end
My main goal is to make my work item type an abbreviation on my subject content. I also tried the following below but i got an error message:
Type: ${workItem.type.abbreviation}
any responses would be helpful. Thanks
I would like to replace the "Type: Task" to "Type:TSK" in my email template subject. This is my idea below:
<script>
function myFunction() {
var task = "TSK";
var Defect= "DFT";
}
</script>
#if(${workItem.type} == "Task") myFunction(Defect) #end
My main goal is to make my work item type an abbreviation on my subject content. I also tried the following below but i got an error message:
Type: ${workItem.type.abbreviation}
any responses would be helpful. Thanks
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 20 '16, 3:12 a.m.I don't understand in which context the above code is supposed to run.
sam detweiler
May 20 '16, 9:01 a.m.he said email template.. which is Velocity
I don't think workitem.type HAS an abbreviation member. so you should get an error
I don't think there are user functions in Velocity... but you might be able to use a macro
https://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html