if(parameter == null){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Ticket", this.getClass().getName()));
}
Ticket ticket = (Ticket)parameter;
// check for mandatory fields
String summary = ticket.getSummary();
if(summary == null || summary.trim().equals("")){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Ticket.summary", this.getClass().getName()));
}
String description = ticket.getDescription();
if(description == null || description.trim().equals("")){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Ticket.description", this.getClass().getName()));
}
MultiParameter multiParameter = new MultiParameter();
multiParameter.addParameter(summary);
multiParameter.addParameter(description);
Hashtable attributes = new Hashtable();
for(String key: TicketKeys.FIELDS_ARRAY){
if(!key.equals(TicketKeys.FIELD_SUMMARY) && !key.equals(TicketKeys.FIELD_DESCRIPTION)){
String attribute = ticket.getOtherAttribute(key);
if(attribute != null && !attribute.trim().equals("")){
attributes.put(key, attribute);
}
}
}