} else {\r
// link to milestone query\r
TicketMilestone milestone = app().tickets().getMilestone(repository, ticket.milestone);\r
- PageParameters milestoneParameters = new PageParameters();\r
- milestoneParameters.put("r", repositoryName);\r
+ PageParameters milestoneParameters;\r
+ if (milestone.isOpen()) {\r
+ milestoneParameters = WicketUtils.newOpenTicketsParameter(repositoryName);\r
+ } else {\r
+ milestoneParameters = WicketUtils.newRepositoryParameter(repositoryName);\r
+ }\r
milestoneParameters.put(Lucene.milestone.name(), ticket.milestone);\r
int progress = 0;\r
int open = 0;\r