(→AHPSCRIPTS-88)
|
(→Include Error Messages in Notifications)
|
Line 188: | |||
## END SECTION Body</pre> | ## END SECTION Body</pre> | ||
+ | = Property in Notification Template (E-Mail) = | ||
+ | *This is a most basic example, but can be expanded upon for more advanced uses of putting a property (from the BuildRequest) into an e-mail. Note that .getBuildRequest() can be subbed with things like getProject() if you want the project, etc. | ||
+ | ==== AHPSCRIPTS-140 ==== | ||
+ | ''CONTEXT SCRIPT'': | ||
+ | <pre>import com.urbancode.anthill3.domain.workflow.*; | ||
+ | WorkflowCase workflow = (WorkflowCase) context.get("workflow"); | ||
+ | context.put("testValue", workflow.getBuildRequest().getProperty("test.property"));</pre> | ||
+ | ''TEMPLATE TEXT'': | ||
+ | *Then, in your template text, simply type the following to return the value of the property from the BuildRequest: | ||
+ | <pre>$testValue</pre> |