TargetProcess is very useful as an agile management tool. We use TP + Bearychat to do the task communication. TP is currently not supported for comment push to the specified item because it does not have related items in the field. However, in the actual operation, the US and the bug in different projects must be corresponding to different items, pushed to different groups, so this is very inconvenient.
The Webhook of TP can be referenced
https://www.targetprocess.com/guide/integrations/web-hooks/targetprocess-web-hooks-use-case/
Considering the comment of the push is very important, so I have to manually compile a middle-webhook, first accept the webhook of TP, and then, convert and determine that it belongs to the specified project , if so, The automatic robot that is push to bearychat.
This is the JSON template, used on the TP side
{"Generalid": "{{generalid}}", "EntityType": "{{generaltype}}", "Entityuri": "{{Entityuri}}", "EntityName": " {{Generalname}} "," CreateDate ":" {{createdate}} "," modification ":" {{modification}} "," AuthorName ":" {{AuthorName }} "," Description ":" {{Description | Toplaintext}} ","
Remotewebhook":" Https://hook.bearychat.com/= you Don't know me, "
Expectedprojectname":" "An Item"} Bold is the field you added. This shows the JSON format pushed to the Bearychat side {
"Text": "[#后台-Data design and interface prototyping design for schema Management #] (http://yourtp/TargetProcess2/entity/1777) was changed by Rock Jing on 2016/4/13 22:16: 07 ",
"Markdown": true,
"Attachments": [
{
"title": "Comment was Created",
"Text": "This can be closed off." \ n ",
"Color": "#ffa500"
}
]
} Overall relatively simple, due to the project created with MVC5, with the controller, the result, found an interesting situation, MVC first block the JSON, if the JSON format is not correct, will not be able to enter the controller, which is very annoying debugging. The unit test has not been able to execute the method actually. Finally, a very simple way to find out is to use the online JSON first to verify, the results found a few imperceptible small problems. Let's finish this topic in a picture.
How to make targetprocess Webhook push comment to a specified project