JIRA描述默认值设置
JIRA描述默认值设置
Setting a Default Value in the Description Field
转自https://confluence.atlassian.com/jira/setting-a-default-value-in-the-description-field-166003857.html
(在 6.3.6 版本上验证通过)
The content on this page relates to platforms which are not supported by JIRA. Consequently, Atlassian cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
This page describes how to set a Default Value for the Description field in JIRA. There's a feature request for this at JRA-4812. Please watch and vote on the issue if this is important to you.
There are workarounds to add this functionality. The modification does not persist if you upgrade JIRA so you'll have to re-apply these steps again in the future. Here are directions to set a default value for your Description field in JIRA:
- Locate and backup the file: WEB-INF/classes/templates/jira/issue/field/description-edit.vm
- Open that file:
1 #controlHeader ($action $field.id $i18n.getText($field.nameKey) $fieldLayoutItem.required $displayParameters.get('noHeader'))
2
3 ## setup some additional parameters
4 $!rendererParams.put("rows", "12")
5 $!rendererParams.put("wrap", "virtual")
6
7 ## let the renderer display the edit component
8 $rendererDescriptor.getEditVM($!description, $!issue.key, $!fieldLayoutItem.rendererType, $!field.id, $!field.name, $rendererParams, false)
9
10 #controlFooter ($action $fieldLayoutItem.getFieldDescription() $displayParameters.get('noHeader'))
- Add a section like this:
1#if($description == '')
2#set ($description = 'Put stuff here:')
3#end
So, ultimately it should look something like:
1#controlHeader ($action $field.id $i18n.getText($field.nameKey) $fieldLayoutItem.required $displayParameters.get('noHeader'))
2
3## setup some additional parameters
4$!rendererParams.put("rows", "12")
5$!rendererParams.put("wrap", "virtual")
6
7
8#if($description == '')
9#set ($description = 'Put stuff here:')
10#end
11
12## let the renderer display the edit component
13$rendererDescriptor.getEditVM($!description, $!issue.key, $!fieldLayoutItem.rendererType, $!field.id, $!field.name, $rendererParams, false)
14
15#controlFooter ($action $fieldLayoutItem.getFieldDescription() $displayParameters.get('noHeader'))
- Restart your JIRA instance.
Adding multi-line values
If you wish to display in the description a default value of:
1Step 1
2
3Step 2
4
5Step 3
you'll need to tweak the above instructions a bit:
1 #set ($description = "Step 1\
2 \
3 Step 2\
4 \
5 Step 3")
6 #set ($description = $description.replace('\',' '))
OK,修改完成后,到前台创建问题的界面,刷新一下,点击创建,效果有了。
- 实验证明,如将”Step 1…” 替换成输入中文,生效后,界面将会直接显示乱码或者报错,这个。。。该怎么解决这个问题?待研究。如哪位童鞋知道有解决方法,请告之一下,谢谢。
- 替换方案
方案吧,也简单,不用中文,直接用英文。。。目前只能使用英文格式暂时先用着,如下:
#if($description == '')
#set ($description = "[Prerequisite]\
1.\
[Step]\
1.\
2.\
3.\
[Actual Result]\
1.\
2.\
3.\
[Expected Result]\
1.\
2.\
3.")
#set ($description = $description.replace('\',' '))
#end
好了,完成,使用没有报错。
JIRA描述默认值设置的更多相关文章
- php与js中函数参数的默认值设置
php函数参数默认值设置: <?phpfunction test($val=3){ echo $val."<br/>";}test(11);test();?& ...
- js方法参数默认值设置
这里的默认值设置 很容易以为和php相似 function(v1,v2="test") { alert(v2); } 但这样是不对的,js方法,如需传参,甚至可以不用预定义(也就是 ...
- sqlserver中GUID的默认值设置
sqlserver中GUID的默认值设置 YID uniqueidentifier not null default (NEWSEQUENTIALID()), //有序GUID(只能用于表设计的时候的 ...
- yii2中textarea中的默认值设置
1. view中显示文本域的位置 <?= $form->field($goods_model, 'goods_introduce')->textArea(['class'=>' ...
- asp.net EF model中的默认值设置
在做数据库规划时,通常会规划一些系统字段,也就是由数据库本身自行指定默认值到这个字段上,创建新的“创建时间(CreateDate)”字段就会常常这样设计. 如果希望能有默认值,且让.net 程序在新增 ...
- UEditor富文本WEB编辑器自定义默认值设置方法
1.在使用UEditor编辑器编写内容时你会发现,当输入的内容较多时,编辑框的边框高度也会自动增加,若希望输入内容较多时以拉框滚动的效果. 方法:找到Ueditor文件根目录下的ueditor.con ...
- 【第十五章】 springboot + pojo默认值设置
我们有时需要给POJO设置默认值 pojo设置(推荐) 1.User package com.xxx.firstboot.domain; import lombok.Getter; import lo ...
- 第十五章 springboot + pojo默认值设置
我们有时需要给POJO设置默认值 pojo设置(推荐) 1.User package com.xxx.firstboot.domain; import lombok.Getter; import lo ...
- C#属性默认值设置
关于在MVC中view中设置默认值,可以象如下设置: 1.关于VIEWMODEL的部分 如果是C# 6.0,网上资料查到说可以 如果语法不支持,只能改回.net 2.0的写法. public cla ...
随机推荐
- Matplotlib中文显示的问题
原文地址:http://blog.csdn.net/rumswell/article/details/6544377 #Matplotlib中文显示有问题,当然可以修改配置文件matplotlibrc ...
- 基于Verilog HDL 的数字电压表设计
本次实验是在“基于Verilog HDL的ADC0809CCN数据采样”实验上进一步改进,利用ADC0809采集到的8位数据,进行BCD编码,以供查表方式相加进行显示,本次实验用三位数码管. ADC0 ...
- 畅通工程续 (dijkstra)
畅通工程续 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- locks
grep 'parking to wait for' gs2_jstack_141203.txt | uniq -c | sort -n查看哪个锁出现次数最多 http://blog.csdn.ne ...
- Delphi XE7 Update1 下载破解、带源码和帮助安装序列号
源:http://blog.csdn.net/tht2009/article/details/39157877 Delphi安装与破解 1.XE7 XE7Update1:http://altd.emb ...
- openstack controller ha测试环境搭建记录(十二)——配置neutron(计算节点)
在计算节点配置内核参数:vi /etc/sysctl.confnet.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0 在计算节点使 ...
- HDU 5678 ztr loves trees
这题也是一眼标算..... 先搞一次dfs,把树转换成序列,对每个节点看子树的中位数,也就是看某段区间的中位数,这样就可以主席树求区间第k大值解决. 注意:询问的次数有1000000次,每次去询问会T ...
- UIImage创建图片的两种方式的区别
在工作中经常会遇到添加图片,用哪种方式添加更好呢?请看详解 方法一: UIImage *image = [UIImage imageNamed:@"haha"]; 这种方法创建的图 ...
- kafka第四篇--快速入门(如何使用kafka)
Quick Start Step 1: Download the code Download the 0.8 release. > tar xzf kafka-<VERSION>.t ...
- Sping--自动装配(byname, bytype)
UserDAOImpl.java: package com.bjsxt.dao.impl; import com.bjsxt.dao.UserDAO; import com.bjsxt.model.U ...