Entity Templates
You can add filter by Projects, Processes, Teams, or any other fields to this rule
Set a description for new items (rich text version)
All the double quotes symbols in the template should be replace with \"
[
{
"type": "source:targetprocess:EntityChanged",
"entityTypes": [
"Request"
],
"modifications": {
"created": true,
"deleted": false,
"updated": false
}
},
{
"type": "filter:Relational",
"or": [
{
"and": [
{
"target": {
"type": "field",
"name": "Description",
"target": {
"type": "pipelineBlockOutput"
}
},
"value": null,
"operator": {
"type": "not exists"
}
}
]
}
]
},
{
"type": "action:targetprocess:UpdateEntity",
"fields": {
"Description": {
"type": "constant",
"value": "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\"><tbody><tr><td><strong>External Reference</strong></td>\t\t\t<td><em>put id here</em></td></tr><tr><td><strong>Issue description</strong></td><td><div><em>short description</em></div>\t\t\t<div><em>multiple lines</em></div></td></tr></tbody></table>"
}
},
"target": {
"type": "pipelineBlockOutput",
"blockAlias": "ui:source"
}
}
]
Set a description for new items (markdown version)
Template always has to start with <!--markdown-->
[
{
"type": "source:targetprocess:EntityChanged",
"entityTypes": [
"userstory"
],
"modifications": {
"created": true,
"deleted": false,
"updated": false
}
},
{
"type": "filter:Relational",
"or": [
{
"and": [
{
"target": {
"type": "field",
"name": "Description",
"target": {
"type": "pipelineBlockOutput"
}
},
"value": null,
"operator": {
"type": "not exists"
}
}
]
}
]
},
{
"type": "action:JavaScript",
"script": "const description = `<!--markdown--> \nAs a _type of user_ \nI'd like to be able to _do this and that_\n`;\n\nreturn {\n command: \"targetprocess:UpdateResource\",\n payload: {\n resourceType: args.ResourceType,\n resourceId: args.ResourceId,\n fields: {\n Description: description\n }\n }\n};\n\n"
}
]
Updated about 4 years ago