如何从 Jira 调用外部 Web 服务?

How to call an external webservice from Jira?

我是一名 Java 开发人员,但不熟悉 Jira。我在 Jira 中创建了一个工作流,我希望在特定步骤中使用当时应用程序表单中的信息调用外部 Web 服务。有没有这个插件,或者我应该开发一些有支持的东西?在这两种情况下,如果可以,请解释我应该如何进行。

嗯,据我所知,有两种可能:

首先是将您自己的 post 函数实现为 Jira 插件,这在编码和维护方面都比较复杂。

更简单的方法是免费 Script Runner plugin. This plugin allows you to customize Jira with simple groovy scripts. It will allow you to write your own workflow post-function, validator or condition (depends on your needs) as a simple Groovy script with the entire Jira and Java API to your disposal. You will be most interested in this part of documentation 让您入门。

基本上这个功能已经内置了! 它被称为 Webhooks:https://confluence.atlassian.com/display/JIRA/Managing+Webhooks

简单示例: 如果您定义了这样一个 Webhook,那么 URL 会在每次问题更新时被调用,其中包含所有字段以及所有更改的字段(之前 - 之后)。

您可以在 Web 服务的工作流转换中拦截您想要的步骤,然后执行您想要的操作。