Managed to find the solution to it.. Using the post function script on insight documentation and then just re-defining newValue in the example with newValue.getUsername().
def newValue = issue.getCustomFieldValue(jiraCustomField);
def user = newValue.getUsername(); //to be used in attribute bean
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.