The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

set default Issue Description Field Problem

INCHUL BAEK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2013

I change default bug Issue Description field when user create bug issue

reference web page is https://confluence.atlassian.com/display/JIRA/Setting+a+Default+Value+in+the+Description+Field

I insert code in description-edit.vm file

changed code is below

#set ($customDescription ="---> remove-this <----

\

h2. analasys

bla

bla

bla

\

h2. test

bla

bla

bla

")

#set ($customDescription = $customDescription.replace('\',' '))

#if ($description.contains('remove-this'))

#set ($description = "")

#end

#if ( ($issue.getProject().getString("key") == 'CSATFSW') || ($issue.getProject().getString("key") == 'RTEMS') )

#if(($description == "") && (($issue.getIssueTypeObject().getName() == "Bug")))

#set ($description = $customDescription)

#end

#end

actually this code have problem

you can see 'remove-this' keyword in my code

as you know, when user create issue, jira issue description field is intended to not clear after user input some content

in case of me, I don't want keep default bug description content when user change issue type (because it's content fit's only bug issue type)

so I tried

if $description == $customDescription

set $description = ''

like this

if any issue type has default bug description value, then it will be clear

but somewhy comparing value is not working

so I workround this problem by using put remove-this keyword

I thought it works fine but after a while some trivial problem happened.

after user created bug issue with 'remove-this' keyword remained,

until user remove 'remove-this' keyworkd, they cant fix ther description :(

I want to solve this problem.

In my opinion, if I found way to work $description == $customDescription this expression

it will be solved

or... when user push Update button when creating issues, put some hooking code to remove 'remove-this' keyworkd mabye..

help me please

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
INCHUL BAEK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2013

thx Eva but I already solved problem :)

and I'm sorry for my pool explanation

0 votes
Eva
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 25, 2013

several questions for you then:

1) you only this to be set at Creation or do you want to set or filter the description every time they update teh description?

2) I am not getting this customDescription. Is it possible if you can format your code better using the "code" button on the format bar?