{
if (sb.length() > 0)
{
sb.append(", ");
}
User aUser = mi.getAssigneeUser();
String encodedUser;
try
{
encodedUser = URLEncoder.encode(aUser.getName(),
"UTF-8");
}
catch (UnsupportedEncodingException e)
{
// --> impossible
encodedUser = aUser.getName();
}
sb.append(getI18nBean().getText("queryfields.opt.assignee"))
.append(": ").append("<a class='user-hover' rel='")
.append(aUser.getName())
.append("' id='issue_summary_assignee_'")
.append(aUser.getName())
.append("' href='/secure/ViewProfile.jspa?name='")
.append(encodedUser).append("'>")
.append(aUser.getDisplayName()).append("</a>");
}
if (options.contains("priority")
&& mi.getPriorityObject() != null)
{
if (sb.length() > 0)
{
sb.append(", ");
}
sb.append(getI18nBean().getText("queryfields.opt.priority"))
.append(": ").append(mi.getPriorityObject().getName());
}
if (options.contains("due") && mi.getDueDate() != null)
{
if (sb.length() > 0)
{
sb.append(", ");
}
sb.append(getI18nBean().getText("queryfields.opt.due"))
.append(": ")
.append(
ComponentAccessor.getJiraAuthenticationContext()
.getOutlookDate().format(mi.getDueDate()));
}
if (sb.length() > 0)
{
sb.insert(0, " (");
sb.append(")");
}
IssueData issueData;
if (options.contains("justDesc"))
{
String descr = mi.getDescription();
if (Utils.isValidStr(descr))
{
issueData = new IssueData(descr, sb.toString());
}
else
{
issueData = new IssueData(mi.getSummary(), sb.toString());
}
}
else if (options.contains("key"))
{
issueData = new IssueData(mi.getKey().concat(":")
.concat(mi.getSummary()), sb.toString());
}
else
{
issueData = new IssueData(mi.getSummary(), sb.toString());
}
params.put("fullValue", issueData);
}
}
if (!Utils.isValidStr(jqlData))
{
params.put("jqlNotSet", Boolean.TRUE);
return params;
}
params.put("jqlNotSet", Boolean.FALSE);
params.put("options", options);
if (options.contains("editKey"))
{
params.put("hasKey", Boolean.TRUE);
}
User user = ComponentManager.getInstance()
.getJiraAuthenticationContext().getLoggedInUser();
SearchService.ParseResult parseResult = searchService.parseQuery(user,
jqlData);
if (parseResult.isValid())
{