Hello
I am using Jira Service Management, and I have a requirement related to a Behaviour script in Jira. My requirement is as follows: When I select the value "None" from the field named "Delay Justification", the Comment field should be empty. When I select any other value from the "Delay Justification" field, the Comment field should automatically display the text "Delay justification Reason please add". I tried below script but it is not working ,all other option when selected , nothing appears in comment field I would appreciate your assistance with achieving this functionality.
import com.atlassian.jira.component.ComponentAccessor
def delayJustificationField = getFieldByName("Delay justification")
def commentField = getFieldByName("Comment")
def delayJustificationValue = delayJustificationField.getValue()
if (delayJustificationValue == "None")
{ commentField.setFormValue("")
else if (delayJustificationValue) {
commentField.setFormValue("Delay justification Reason please add") }
Hi,
can you try : if (delayJustificationValue == null)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its not working , still i see the comment when none is selected
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.