How to make targetprocess Webhook push comment to a specified project

Source: Internet
Author: User
Tags webhook

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.