//Name Force change of handler
//Description New handler must not be same as existing handler, except when he/she has status of "QA-Team"
//Type Trigger / Add Message / BEFORE Trigger  
//Comments: also an example how to format exception text HTML way
String str=message.getHandler().getName();
String oldStr=message.getTask().getHandler().getName();
List a=	message.getTask().getHandlerPrstatuses();

if (oldStr.equals(str) && a.indexOf("QA-Team")<0) {
  throw new com.trackstudio.exception.UserMessageException("You have to change the task handler at this step.<br/>Please set the handler to someone different as <b>"+str+"</b>");
}