final String[] statiiParam = (params == null) ? TicketsUI.openStatii : params.getStringArray(Lucene.status.name());
final String assignedToParam = (params == null) ? "" : params.getString(Lucene.responsible.name(), null);
final String milestoneParam = (params == null) ? "" : params.getString(Lucene.milestone.name(), null);
+ // todo jeyoung add repository to this filter
final String queryParam = (params == null || StringUtils.isEmpty(params.getString("q", null))) ? "watchedby:" + username : params.getString("q", null);
final String searchParam = (params == null) ? "" : params.getString("s", null);
final String sortBy = (params == null) ? "" : Lucene.fromString(params.getString("sort", Lucene.created.name())).name();
add(sortMenu);
// by repository
- List<RepositoryModel> repositoryChoices = new ArrayList<RepositoryModel>();
- // todo add repository choices here
-
+ List<RepositoryModel> repositoryChoices = getRepositoryModels();
RepositoryModel currentRepository = repositoryChoices.size() > 0 ? repositoryChoices.get(0) : null;
for (RepositoryModel r : repositoryChoices) {
if (r.name.equals(repository)) {
}
add(new Label("currentRepository", currentRepository == null ? "none" : currentRepository.name));
+ // todo insert a "none" option that will show tickets for all
+ // repositories
ListDataProvider<RepositoryModel> repositoryChoicesDp = new ListDataProvider<RepositoryModel>(repositoryChoices);
DataView<RepositoryModel> repositoryMenu = new DataView<RepositoryModel>("repository", repositoryChoicesDp) {
private static final long serialVersionUID = 1L;
}
}
+ // todo jeyoung specify repository name, similar to above
+
final String luceneQuery;
if (qb.containsField(Lucene.createdby.name())
|| qb.containsField(Lucene.responsible.name())
params.add("direction", "asc");
}
if (!StringUtils.isEmpty(repository)) {
- params.add("repository", repository);
+ params.add(Lucene.repository.name(), repository);
}
if (page > 1) {
params.add("pg", "" + page);