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

为描述字段设置默认信息格式

第一步

进入到插件管理中Behaviours的编辑器

第二步

新增一个Behaviours脚本,填写名称后,进入到编辑界面

第三步

在编辑界面中的Initialiser,增加以下脚本

注意:defaultValue脚本需要根据自己的实际情况 编写


def desc = getFieldById("description")

def defaultValue = """\
        h2. Renewal Information
        * Confirm Company Name:
        * Confirm Existing License:
        * Confirm Number of Users:
        * Confirm Type of License:

        h3. Notes
        Provide any notes on renewal. Copy/pate from proposals and email correspondence as needed.

        h3. Final Actions
        * Update Jira Issue with appropriate information.
        * Assign issue to Licensing lead for approval.
    """.stripIndent()

if (!desc.formValue) {
    desc.setFormValue(defaultValue)
}

第四步

进入此Behaviours的applicable context ,设定应用场景,保存即可


结果

说明

填写的格式化内容,可以使用markdown语法进行格式化,可以在页面上创建问题的描述中进行内容格式编写,然后转到文本中查看markdown的格式

转化为格式化的markdown格式


  • No labels