I want to create a post-function that will assign an issue to the last member from in the Quality Assurance role that it was assigned to. However, if nobody in that role had the issue before, I want to assign it to a specific user.
e.g. Bob (Developer) creates a bug. He transitions it, which should assign it to the last QA role member that had it, but nobody in QA was ever assigned to the issue, so the issue should transition to Sally.
Any ideas on how I can achieve this?