The situation I have is as follow:
I need to wipe out the fields in a behavior when a new dropdown is selected. The problem is whenever I click create button and an error exist on the form it is wiping out the fields for some reason, even though I am checking for "getFieldsChanged()". I just figured at this point, an easy workaround is to check for any errors that would be returned and if some errors are returned, I'll just build an exception where the clear fields function is called. I have no idea how to get the error returned though... Is anyone able to provide me syntax on how to do this? This is what I've got going so far but the list is empty.
def jiraServiceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection())
def errorList = jiraServiceContext.getErrorCollection()
log.debug(errorList.dump()) // currently outputting {}
Much appreciated
Harvey