From 3286926d2ec11445f76cd170e4c2fcff597a0754 Mon Sep 17 00:00:00 2001
From: Fabrice Bacchella <fbacchella@spamcop.net>
Date: Tue, 26 May 2015 04:48:40 -0400
Subject: [PATCH] Two slight improvement for custom UserService: - try userRealm as a file only if class is not found, other exeptions are real error - log userService only after setup, for better logging, as it can use gitblit.properties for custom .toString

---
 src/main/java/com/gitblit/tickets/TicketMilestone.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gitblit/tickets/TicketMilestone.java b/src/main/java/com/gitblit/tickets/TicketMilestone.java
index c6b4fcc..dacedda 100644
--- a/src/main/java/com/gitblit/tickets/TicketMilestone.java
+++ b/src/main/java/com/gitblit/tickets/TicketMilestone.java
@@ -38,6 +38,18 @@
 		status = Status.Open;
 	}
 
+	public boolean isOpen() {
+		return status == Status.Open;
+	}
+
+	public boolean isOverdue() {
+		return due == null ? false : System.currentTimeMillis() > due.getTime();
+	}
+
+	public void setDue(Date due) {
+		this.due = due;
+	}
+
 	public int getProgress() {
 		int total = getTotalTickets();
 		if (total == 0) {

--
Gitblit v1.9.1