Three developers have spent a better part of an afternoon try to solve this:
I have a text custom field that doesn't accept certain characters. JIRA has this validation built-in, but I want to go one step further and highlight exactly what character was invalid.
I thought I should override CreateIssueDetails.doValidate(), get the custom field value, check for the invalid characters, and send back an error. But my customField.getValue(issueObject) call always returns null. The code is simple:
CustomField field = getCustomFieldManager().getCustomFieldObjectByName("custom_field");
String value = (String)field.getValue(getIssueObject());
However, no matter how I try, the value is always null. Has the fieldValue not been set yet since I'm still in validate? If so, where do I find the value that's in the text box?? I thought maybe it would be in some temporary holding area, awaiting to be inserted into the database, but I can't figure out what that would be. getFieldValuesHolder() returns null.
Any thoughts??