作用
变量是在目标问题中自动填充的占位符,就是填写表单中的一个提示。变更分为两类:系统变量和用户变量。
系统变量
Name | Description |
---|---|
$ISSUE KEY | Key of the current issue |
$TODAY | Current date, e.g. 11.02.21 |
$USER_NAME | Full name of the user who created the issue |
$PROJECT_KEY | Key of the project |
$CURRENT_TIME | Current time, e.g. 12:53 |
$USER_KEY | Key of the user who created the issue |
$USER_MAIL | Email address of the user who created the issue |
$CURRENT_USER_KEY | Key of the current user |
$CURRENT_USER_NAME | Full name of the current user |
$CURRENT_USER_MAIL | Email address of the current user |
$PROJECT_NAME | Name of the project |
$PROJECT_LEAD | Full name of the project lead |
$TOMORROW | Tomorrow, e.g. 12.02.21 |
$NEXT_WEEK | Next week, e.g. 18.02.21 |
$CUSTOMFIELD_10000 | Custom field value. Replace ‘10000’ with your custom field ID. |
可用于子任务的系统变量
Name | Description |
---|---|
$PARENT_KEY | Key of the parent issue |
$PARENT_SUMMARY | Summary of the parent issue |
$PARENT_DESCRIPTION | Description of the parent issue |
$PARENT_ISSUETYPE | Issue type of the parent issue |
$PARENT_STATUS | Status of the parent issue |
$PARENT_PRIORITY | Priority of the parent issue |
$PARENT_DUE_DATE | Due date of the parent issue |
$PARENT_CUSTOMFIELD_10000 | Parent 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”,在弹出的对话框中填写信息
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”标签。