I like to put defaults text in the description field:
for example:
******************
Steps to reproduce:
Expected results:
Actual results:
*****************
Is there a way to do that?
Thanks
Go to the particular Field Configuration and find the Description field. Click "Edit" and in the description for this field add text similar to the following:
<script type="text/javascript"> if (document.getElementById("description").value == "") { document.getElementById("description").value = "*Steps to Reproduce* \n\n\n\n*Expected Results* \n\n\n\n*Actual Results* \n"; } </script>
You cannot give default text without populating it using Javascript or something. Using Javascript maybe an idea though!.
Another option is to use a description (by editing the description field in the field configuration) that asks the user to enter ther description in the said format.
Is this for a custom field you are creating? What is the context? You can edit this sort of thing in the .vm file. I have just created a custom field and have specified name, default values etc so I would assume you could do the same for the description field.
I just want to add the stuff I mentioned previously.
I want the description field to show this text in it.
in which case, perhaps edit the .vm file associated with a particular field type?
the edit-xxxxx .vm files are found here on my computer: C:\Program Files\Atlassian\JIRA 4.3.4\atlassian-jira\WEB-INF\classes\templates\plugins\fields\edit
I will give this a shot today. Thanks
write this in body of .vm file.
#set($description="yourcontent")
or if u want new line charactersand all,
use this
AJS.toInit(function () {
AJS.$("#description").text(" steps to produce \r \r expedted results \r \r")});
This fixed my problem. THanks to everyone who suggested. I decided to stay away from editing the vm file.
Hello Sean,
I tried the same as you suggested, but unable to view default text in the description field.
Is there any requirement of add-on? Please let me know how to add those text?
Thanks!
It looks like you're new here. Sign in or register to get started.