我的需求是在问题创建后的2分钟后发送Webhook请求。正常的设置步骤如下,但由于当前jira未实现“Delay”延迟条件,请问在不进行二次开发的前提下,有什么办法可以达到这个效果吗?
预期设置步骤:
1. 登录到Jira。
2. 在项目菜单中,选择 "设置"(Settings)。
3. 在项目设置页面,找到并选择 "自动化"(Automation)。
4. 在自动化页面,点击 "创建规则"(Create rule)按钮。
5. 在规则创建页面,选择 "当"(When)部分,然后选择 "问题创建后"(Issue created)。
6. 在 "执行"(Then)部分,点击 "添加条件"(Add condition)按钮,并选择 "延迟"(Delay)。
7. 在 "延迟"条件的配置中,填写以下信息:
- 延迟时长(Delay duration):输入 "2m",表示延迟2分钟。
8. 在 "执行"(Then)部分,点击 "添加组件"(Add component)按钮,并选择 "发送Webhook请求"(Send Web Request)。
9. 在 "发送Webhook请求"组件的设置相关配置。
10. 点击 "保存"(Save)以保存规则。
预期通过以上设置,当问题创建后,Jira会延迟2分钟后执行发送Webhook请求的操作。但实际没有“Delay”条件。
What problem are you trying to solve by doing this? Knowing that may help the community to offer suggestions.
Until we know that information...
That is not possible using rule actions directly. There is no "delay rule execution" action.
There are a few possible work-arounds:
#1) A possible work-around would be to use a Send Web Request action to call a REST API which performs the delay, and have the action wait before proceeding. I recommend not doing this, as it may have unknown impacts upon your automation usage limits.
Some better approaches could be:
#2) Use 2 rules, where one is triggered on the issue create, and which sets a custom field to the current time plus 2 minutes. Then use a second rule with a scheduled trigger and JQL to find issues with that field set, relative to the current time. The field could then be cleared before the rule proceeds.
#3) Use 2 rules, where again the first is triggered on issue create, and which then sends a web request to a REST API to perform a call back in 2 minutes. Then use a second rule triggered on a webhook to listen for the call back.
Please note: all of these work-arounds are subject to the running of the Atlassian automation infrastructure. And so if there is an outage or delay in processing, there is no guarantee that the action delay will be exactly 2 minutes.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.