}
AutocompleteUniversalData entity = new AutocompleteUniversalData();
if (Utils.isOfQueryMultiSelectType(cf.getCustomFieldType().getKey()))
{
Issue issue = ComponentManager.getInstance().getIssueManager()
.getIssueObject(cfValue);
if (issue == null)
{
// nothing to do. Sending object with empty key
}
else
{
String icon;
entity.setName(issue.getKey());
if (issue.getIssueTypeObject() != null)
{
entity.setType(issue.getIssueTypeObject().getName());
icon = issue.getIssueTypeObject().getIconUrl();
if (Utils.isValidStr(icon))
{
entity.setTypeimage(icon);
}
}
entity.setDescription(issue.getSummary());
if (issue.getStatusObject() != null)
{
entity.setState(issue.getStatusObject().getName());
icon = issue.getStatusObject().getIconUrl();
if (Utils.isValidStr(icon))
{
entity.setStateimage(icon);
}
}
if (issue.getPriorityObject() != null)
{
entity.setPreference(issue.getPriorityObject().getName());
icon = issue.getPriorityObject().getIconUrl();
if (Utils.isValidStr(icon))
{
entity.setPreferenceimage(icon);
}
}