针对问题的
{{issue.field.property}}
field可以为具体的字段名称,字段可以理解为一个对象,对象中包括各类property,
property可以为属性的名称,属性如果为对象,可以继续进行property的信息获取。
如果有多个字段重名,可以使用 {{issue.customfield_10001}} 方式。 具体的字段的ID值获得,可以参见:91-如何获得系统实体的ID
针对时间的
{{issue.created.format("dd/MM/yyyy")}}
{{now.plusDays(5)}}
时间格式可以进行格式化,也可以进行相关计算
对于多项数据信息
我们获得一组数据,需要进行格式化展示时,可以使用#,它对捕获的所有内容都执行相同的操作。使用#时,必须始终以 {{/}}结尾才能关闭它。以下为评论展示的示例
{{#issue.comments}}Author: {{author.displayName}}{{/}}
若要将项视为数字,在使用数学函数时,请使用 {{#=}},如要执行一个简单的计算,
{{#=}}{{issue.Invoice Amount}} + 100{{/}}
默认值
如果获得的数据没有值,那么会显示错误,可以给到一个默认值
{{invalid reference|Hello world}}
.
更多信息参见
- Examples of using smart values with dates
- Examples of using smart values with lists
- Examples of using math expression smart values
- Examples of using smart values with text strings