summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/TicketPage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/TicketPage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
index f5f63d23..b1f94a5b 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
@@ -249,9 +249,12 @@ public class TicketPage extends RepositoryPage {
add(new Label("milestone"));
} else {
// link to milestone query
- TicketMilestone milestone = app().tickets().getMilestone(repository, ticket.milestone);
+ TicketMilestone tm = app().tickets().getMilestone(repository, ticket.milestone);
+ if (tm == null) {
+ tm = new TicketMilestone(ticket.milestone);
+ }
PageParameters milestoneParameters;
- if (milestone.isOpen()) {
+ if (tm.isOpen()) {
milestoneParameters = WicketUtils.newOpenTicketsParameter(repositoryName);
} else {
milestoneParameters = WicketUtils.newRepositoryParameter(repositoryName);
@@ -260,10 +263,10 @@ public class TicketPage extends RepositoryPage {
int progress = 0;
int open = 0;
int closed = 0;
- if (milestone != null) {
- progress = milestone.getProgress();
- open = milestone.getOpenTickets();
- closed = milestone.getClosedTickets();
+ if (tm != null) {
+ progress = tm.getProgress();
+ open = tm.getOpenTickets();
+ closed = tm.getClosedTickets();
}
Fragment milestoneProgress = new Fragment("milestone", "milestoneProgressFragment", this);