Hello Everyone,
I would like to add below text in my description field.
Expected behavior:
Observed behavior:
I checked the .vm files but unable to to find any file associated with this field. Kindly help me on this.
Thank you in Advance.
Please see this article - https://confluence.atlassian.com/jira/setting-a-default-value-in-the-description-field-166003857.html
If you have script runner plugin installed then this is how it's done.
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
Thank you for this.
I have one more doubt.
We have two tab(Field Tab and Customer Information) as shown in the screenshot. In the first tab we have description field and customer description in second tab in which we want some values. I have the below script. There is no error but when i go back and create the issue i dont see the values. Please check where i am wrong.
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.fields.CustomField;
def desc = getFieldById("description")
def defaultValue = """Initial condition:
Stimulus applied:
""".replaceAll(/ /, '')
if (! underlyingIssue?.description) {
desc.setFormValue(defaultValue)
}
def desc1 = getFieldById("Customer Description")
def defaultValue1 = """
ATTENTION: PLEASE DO NOT CHANGE THE ORDER OF THE FOLLOWING INFORMATION !!!!
Teiledaten / part information :
Teilenummer / part number: 5WA 937 086
EE- Gerätetyp / EE- device type: BCM MQB37W
HW:
SW:
====================================================================
Customer Description:
""".replaceAll(/ /, '')
def customFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField customField = customFieldManager.getCustomFieldObjectByName("Customer Description");
String customerDescription = customField.getValue(underlyingIssue);
//if(customerDescription !=null && ! customerDescription.isEmpty()){
desc1.setFormValue(defaultValue1)
//}
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please accept the answer/upvote so that others know this as an accepted answer. thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.