I've set the code and it succesfully ran but the Security Level was not set.
I made it as a post function during creation.
It says it ran succesfully but below is the logs. The Security is set which is why I don't understand why it is not working.
issue.issueType.name == 'Review'
2017-06-19 04:19:00,622 WARN [postfunctions.SetIssueSecurity]: No security level: 10400 defined in issue security scheme for project Delivery Management - maybe deleted from scheme?