I want to add this:
Any of the following conditions:
-Script workflow function : The action will be allowed if the issue matches the JQL query: "issuetype = Bug and affectedVersion is not EMPTY"
-Script workflow function : The action will be allowed if the issue matches the JQL query: "issuetype != Bug"