You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

非管理员权限下Jira自动化规则创建指引(替代JSON导入)

Jira自动化规则手动配置步骤(同步父工单截止日期)

以下是无管理员权限时,手动配置Jira自动化规则的详细操作,实现需求:当子工单的截止日期(Due Date)被修改,且该子工单关联父工单时,若子工单截止日期晚于父工单截止日期,或父工单截止日期为空,则更新父工单的截止日期。

步骤1:创建规则并设置触发条件

  • 进入项目的「Automation」板块,点击「Create rule」
  • 选择触发类型:Field value changed(字段值变更)
  • 配置触发字段:选择「Due date」(截止日期),保存触发条件

步骤2:添加条件:验证子工单存在父工单

  • 点击「Add component」→ 选择「Condition」(条件)
  • 选择条件类型:Issue fields condition(工单字段条件)
  • 配置:
    • 字段选择「Parent」(父工单)
    • 操作符选择「is not empty」(不为空)
  • 保存该条件

步骤3:添加分支:针对父工单执行后续操作

  • 点击「Add component」→ 选择「Branch」(分支)
  • 选择分支类型:Parent issue(父工单),保存分支配置

步骤4:在分支内添加OR逻辑条件

在父工单分支下,添加「Condition」:

  • 选择条件类型:OR condition(或条件)
  • 添加第一个子条件:
    • 选择「Advanced compare condition」(高级比较条件)
    • 配置:
      • 第一个值:{{issue.duedate}}(子工单的截止日期)
      • 操作符:is after(晚于)
      • 第二个值:{{issue.parent.duedate}}(父工单的截止日期)
  • 添加第二个子条件:
    • 选择「Issue fields condition」(工单字段条件)
    • 配置:
      • 字段选择「Due date」(截止日期)
      • 操作符选择「is empty」(为空)
      • 范围(Scope)选择「Parent issue」(父工单)
  • 保存OR条件

步骤5:添加动作:更新父工单的截止日期

在父工单分支下,添加「Action」(动作):

  • 选择动作类型:Edit issue(编辑工单)
  • 配置:
    • 范围(Scope)选择「Parent issue」(父工单)
    • 编辑字段:选择「Due date」,设置值为{{issue.duedate}}(子工单的截止日期)
  • 保存动作

对应规则的JSON脚本

{
  "name": "Sync Parent Due Date with Child",
  "description": "When a child's Due Date is updated, update the parent Due Date if the child has a later date or if the parent Due Date is blank.",
  "projects": [],
  "status": "ENABLED",
  "trigger": {
    "type": "FieldValueChanged",
    "field": "duedate"
  },
  "components": [
    {
      "type": "condition",
      "conditionType": "jira.issue.condition",
      "configuration": {
        "field": "parent",
        "operator": "is_not_empty"
      }
    },
    {
      "type": "branch",
      "branchType": "parent",
      "children": [
        {
          "type": "condition",
          "conditionType": "jira.or.condition",
          "configuration": {
            "conditions": [
              {
                "type": "condition",
                "conditionType": "jira.advanced.compare.condition",
                "configuration": {
                  "firstValue": "{{issue.duedate}}",
                  "operator": "isAfter",
                  "secondValue": "{{issue.parent.duedate}}"
                }
              },
              {
                "type": "condition",
                "conditionType": "jira.issue.condition",
                "configuration": {
                  "field": "duedate",
                  "operator": "is_empty",
                  "scope": "parent"
                }
              }
            ]
          }
        },
        {
          "type": "action",
          "actionType": "jira.edit.issue",
          "configuration": {
            "fields": {
              "duedate": "{{issue.duedate}}"
            },
            "scope": "parent"
          }
        }
      ]
    }
  ],
  "schemaVersion": "1"
}

内容的提问来源于stack exchange,提问作者NewPythonUser

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 11:45:10