From 0353c1fc521826c57a318affec4fbec7aa3b71e9 Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 5 Mar 2014 11:26:26 -0500 Subject: Allow unregistered milestone selection on edit ticket page --- src/main/java/com/gitblit/wicket/pages/EditTicketPage.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java index 32b202fb..ac7ff97e 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java @@ -284,6 +284,13 @@ public class EditTicketPage extends RepositoryPage { break; } } + if (milestoneModel.getObject() == null && !StringUtils.isEmpty(ticket.milestone)) { + // ensure that this unrecognized milestone is listed + // so that we get the selection. + TicketMilestone tms = new TicketMilestone(ticket.milestone); + milestones.add(tms); + milestoneModel.setObject(tms); + } if (!milestones.isEmpty()) { milestones.add(new TicketMilestone(NIL)); } -- cgit v1.2.3