浏览主题

How to automatically assign issues with Jira Automation

浏览主题

根据 Jira 中的条件自动分配已创建的事务

您可以使用 if/else 条件创建 Jira 自动化规则,该条件会根据用户组的事务类型自动将事务分配给用户组。

在 Jira 中导航到项目设置自动化选项卡。在规则选项卡中,点击屏幕右上角的创建规则。在新触发器屏幕上,选择已创建事务,然后点击保存

Navigate to the Automation tab of your project settings in Jira. In the rules tab, click on Create rule in the top right corner of the screen. On the New trigger screen select Issue created and click Save

在“添加组件”屏幕上,点击新建条件

On the Add component screen, click New condition

新建条件屏幕上,选择 if/else 块选项。这将创建一个条件,根据自动化规则中的条件启动操作。

On the New condition screen select the if/else block option. This creates a condition that initiates an action depending on criteria in the automation rule.

If block 屏幕上,点击添加条件...

On the If block screen, click Add Condition...

If Block 屏幕中,选择事务字段条件选项。

In the If Block screen, select the Issue fields condition option.

在本演示中,我们将为事务类型 > 等于 > 错误设置条件。请务必点击保存

For this demo we set the condition for Issue Type > equals > Bug. Be sure to click Save.

接下来,添加将错误分配给特定用户组的操作。在包含自动化规则摘要的左侧边栏中,点击 If:matches 条件下方的添加组件文本。

Next, add an action that assigns bugs to a certain group of users. On the left sidebar, which has a summary of the automation rule, click the Add component text underneath the If:matches condition.

系统将提示您输入新组件。点击新操作

You will be prompted for a New component. Click New Action.

新操作屏幕上,搜索并点击分配事务选项。

On the New Action screen search for and click the Assign issue option

分配事务提示中,选择要分配事务的用户。点击保存按钮。

From the Assign issue prompt, select a user to assign bugs to. Click the Save button.

接下来,您可以在 If:matches 条件中添加 if/else 条件。如果 If block 中的条件不匹配,则规则将评估 Else block。点击左侧边栏中的添加其他文本。

Next you can add an if/else condition to the If:matches condition. If the condition in the If block does not match, then the rule will evaluate the Else block. Click on the Add else text on the left sidebar.

将前往 Else block 屏幕。点击添加条件文本,然后选择另一个事务字段条件

You will be brought to the Else block screen. Click the Add conditions text and select another Issue fields condition.

Else-if block 添加一个新条件。下方示例演示如何添加一个新的 Else-if 条件,该条件在事务类型值等于任务时激活。

Add a new condition to the Else-if block. The example below demonstrates how to add a new Else-if condition that is activated when the issues type value equals Task.

重复上述步骤,向 Else-if 条件添加操作。下方示例说明了如何创建将事务分配给其他用户的附加操作。

Repeat the steps to add an action to the Else-if condition. The example below illustrates how to create an additional action that assigns the issue to another user.

此规则具有 IfElse-if 条件,用于检查特定类型的事务,以便在任一条件匹配时执行后续操作。接下来,使用另一个操作填写剩余的其他条件。点击规则详细信息侧边栏上的添加其他文本,然后点击“保存”按钮。重复上述步骤,将分配事务操作添加到新的其他条件中。

下方示例展示了如何设置分配事务操作,以自动将事务分配给列表中的用户。

How to set the Assign issue action to automatically assign the issue to a user in a list.

分配事务演示了自动将事务分配给列表中的用户的平衡工作负载分配。平衡工作负载分配将平均分配,这样分配给列表中的用户的事务就不会多于其他用户。配置新的分配事务操作后,点击保存按钮。

下方屏幕截图详细说明了最终规则的详细内容:应该包括:

1 触发器 - 时间:事务已创建

3 个条件 - If:matches、Else-if:matches、Else

3 个操作 - 然后:将事务分配给 x 3

为此规则输入一个名称,然后点击打开按钮。在下方示例中,我们使用了“按类型自动分配事务”的名称。您应该会看到下方的成功指示器。

click the Turn it on button

现在规则已经启用,您可以通过在项目中创建一些事务来触发。尝试创建错误任务类型的事务。然后,您可以通过访问审核日志来验证自动化规则是否正常运行。

Now that the rule has been enabled you can trigger it by creating some issues within your project.

审核日志将向您显示自动化规则创建和执行的历史记录。如果自动化规则存在任何问题或错误,审核日志将突出显示这些问题或错误,并提供调试支持。如果您想了解其他规则示例,请访问我们的规则模板库

为您推荐

模板

现成的 Jira 模板

浏览我们适用于不同团队、部门和工作流的自定义 Jira 模板库。

产品指南

Jira 的全面介绍

使用这份分步指南,了解核心功能与最佳实践,以最大限度地提升您的工作效率。

Git 指南

了解 Git 的基础知识

无论您是初学者还是资深专家,本 Git 指南都将通过实用教程与技巧助您掌握基础知识。