Throwable cause = e1.getCause();
String details = (cause instanceof XmlRpcException) ? cause.getMessage() : e1.getMessage();
return "Failed to access BZ " + bugId + ": " + details;
}
}
Bug bug = getBug.getBug();
if (bug != null) {
String product = bug.getProduct();
if (product.equals("RHQ Project")) {
product = "RHQ";
} else if (product.equals("JBoss Operations Network")) {
product = "JON";
}
return "BZ " + bugId + " [product=" + product + ", priority=" + Color.GREEN + bug.getPriority()
+ Color.NORMAL + ", status=" + bug.getStatus() + "] " + Color.RED + bug.getSummary() + Color.NORMAL
+ " [ https://bugzilla.redhat.com/" + bugId + " ]";
} else {
return ("BZ " + bugId + " does not exist.");
}
}