public GenericValue getGenericValue()
{
Map values = new HashMap();
values.put("id", getId());
values.put("project", getProject().getLong("id"));
values.put("key", getKey());
values.put("type", getIdFromIssueConstant(getIssueTypeObject()));
values.put("status", getIdFromIssueConstant(getStatusObject()));
values.put("priority", getIdFromIssueConstant(getPriorityObject()));
values.put("resolution", getIdFromIssueConstant(getResolution()));
values.put("reporter", getReporterId());
values.put("assignee", getAssigneeId());
values.put("creator", getCreatorId());
values.put("summary", getSummary());
values.put("description", getDescription());
values.put("environment", getEnvironment());
values.put("created", getCreated());
values.put("updated", getUpdated());
values.put("duedate", getDueDate());
values.put("votes", getVotes());
values.put("timeoriginalestimate", getOriginalEstimate());
values.put("timeestimate", getEstimate());
values.put("timespent", getTimeSpent());
values.put("security", getSecurityLevelId());
return new ImmutableGenericValue(CoreFactory.getGenericDelegator(), "Issue", values);
}