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 |
Be the first one to answer this question!
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.
Comments
I don't understand in which context the above code is supposed to run.
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