Page tree
Skip to end of metadata
Go to start of metadata

作用

变量是在目标问题中自动填充的占位符,就是填写表单中的一个提示。变更分为两类:系统变量和用户变量。

系统变量

NameDescription
$ISSUE KEYKey of the current issue
$TODAYCurrent date, e.g. 11.02.21
$USER_NAMEFull name of the user who created the issue
$PROJECT_KEYKey of the project
$CURRENT_TIMECurrent time, e.g. 12:53
$USER_KEYKey of the user who created the issue
$USER_MAILEmail address of the user who created the issue
$CURRENT_USER_KEYKey of the current user
$CURRENT_USER_NAMEFull name of the current user
$CURRENT_USER_MAILEmail address of the current user
$PROJECT_NAMEName of the project
$PROJECT_LEADFull name of the project lead
$TOMORROWTomorrow, e.g. 12.02.21
$NEXT_WEEKNext week, e.g. 18.02.21
$CUSTOMFIELD_10000Custom field value. Replace ‘10000’ with your custom field ID.

可用于子任务的系统变量

NameDescription
$PARENT_KEYKey of the parent issue
$PARENT_SUMMARYSummary of the parent issue
$PARENT_DESCRIPTIONDescription of the parent issue
$PARENT_ISSUETYPEIssue type of the parent issue
$PARENT_STATUSStatus of the parent issue
$PARENT_PRIORITYPriority of the parent issue
$PARENT_DUE_DATEDue date of the parent issue
$PARENT_CUSTOMFIELD_10000Parent custom field value. Replace “10000” with the custom field ID of the parent issue.


变量使用

可以在模块中直接进行写入相就的变量名称


用户变量

用户变量是占位符,可以自己创建和配置。此外,作为模板库(TEMP)项目的管理员,可以将它们应用到指定的模板中。

定义用户变量

管理员可以登录到项目配置里进行用户变量的管理

变量的类包括以下几种

  • Text (single line)
  • Text (multi-line)
  • Select
  • Multi-select
  • Cascading select

创建新变量时,可以点进“New variable”,在弹出的对话框中填写信息

Jira Issue Templates - Variables

Define variable

变理称呼我,可以使用输入“[]”来搜索使用

Field type

变更名称类型可包括以下几类:

  • Text (single line)
  • Text (multi-line)
  • Select
  • Multi-select
  • Cascading select

Options

如果变更类型为选择或多选类型时,可以进一步定义它的可选项,并可对他们进行排序

Label

最好在变量中添加一个标签,使模板看起来更方便。

Description

您可能想向其他用户提供一个关于您的变量的作用的提示。描述将显示在变量字段的正下方。

Required on create screen

如果想在创建屏幕上强制使用变量,可以开启此项。这样每个使用模板创建问题的用户都会被提示,需要填写变量的字段

Available in other template issues (

通过选中此项,可以在所有模板问题中共享变量,它旁边会有“GLOBAL”标签。






  • No labels