In my scripted field, I'm getting null instead of condition message. Could someone please have a look and tell me what's wrong?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.link.IssueLinkManager
import com.atlassian.jira.user.ApplicationUser
Issue issueKey = issue
def id=issueKey.getId()
def customFieldManager = ComponentAccessor.getCustomFieldManager();
def cf = ComponentAccessor.customFieldManager.getCustomFieldObject("customfield_18747")
def field_value = issue.getCustomFieldValue(cf) as Map
def a = field_value?.getAt(null).toString()
def b = field_value?.getAt("1").toString()
if (!b) {
return ("Error in field '" + cf + "': the second part cannot be empty")
}
Hello @Ashok Barik ,
What is your custom field type ? Are you sure its value is of type Map ?
Can you add
log.error("field_value : " + field_value)
log.error("field_value class : " + field_value.getClass())
So we can see the actual value and type ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.