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 ...
随机推荐
- 贝塞尔曲线 & CAShapeLayer & Stroke 动画 浅谈
转载自:http://46aae4d1e2371e4aa769798941cef698.devproxy.yunshipei.com/qiaoqiaoqiao2014/article/details/ ...
- Android tcpdump抓包应用实现
Android tcpdump抓包应用实现 Android应用很多时候都会涉及到网络,在请求网络出错时,我们可以通过抓包来分析网络请求,返回的数据等,通常我们是用tcpdump这个工具来抓包,再通 ...
- error=11, Resource temporarily unavailable
问题1:Cannot run program "/bin/ls": error=11, Resource temporarily unavailable 1 15/04/22 14 ...
- zencart 掉炸天的tpl_main_page.php
<?php /** * Common Template - tpl_main_page.php * * @version $Id: tpl_main_page.php 7085 2007-09- ...
- fork,exec,source
http://alsww.blog.51cto.com/2001924/1113112 http://stackoverflow.com/questions/1127502/start-stop-da ...
- Ubuntu“无法解析或打开软件包的列表或是状态文件”的解决办法。_StarSasumi_新浪博客
Ubuntu"无法解析或打开软件包的列表或是状态文件"的解决办法. (2011-04-30 14:56:14) 转载▼ 标签: ubuntu apt 分类: Ubuntu/Linu ...
- (简单) POJ 2240 Arbitrage,SPFA。
Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit o ...
- Android获取手机屏幕宽高
//如果是获取单位是像素,可以如下: Display display = getWindowManager().getDefaultDisplay(); Point size = new Point( ...
- layer 的一些知识
layer类似于ps的图层,如果把一个uiview看做图片的画,layer就像是图层.一个图片是由很多个大小不同的有层次的图层构成的,uiview也是. 1. 一个view有一个underlying ...
- java 生成不重复的随机数
import java.text.SimpleDateFormat;import java.util.Date; public class Test2 { public static void mai ...