From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit,  gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command

---
 src/com/gitblit/models/IssueModel.java |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/com/gitblit/models/IssueModel.java b/src/com/gitblit/models/IssueModel.java
index 19241c2..3c191e2 100644
--- a/src/com/gitblit/models/IssueModel.java
+++ b/src/com/gitblit/models/IssueModel.java
@@ -59,7 +59,8 @@
 	public List<Change> changes;
 
 	public IssueModel() {
-		created = new Date((System.currentTimeMillis() / 1000) * 1000);
+		// the first applied change set the date appropriately
+		created = new Date(0);
 
 		type = Type.Defect;
 		status = Status.New;
@@ -106,7 +107,21 @@
 		return attachment;
 	}
 
+	public List<Attachment> getAttachments() {
+		List<Attachment> list = new ArrayList<Attachment>();
+		for (Change change : changes) {
+			if (change.hasAttachments()) {
+				list.addAll(change.attachments);
+			}
+		}
+		return list;
+	}
+
 	public void applyChange(Change change) {
+		if (changes.size() == 0) {
+			// first change created the issue
+			created = change.created;
+		}
 		changes.add(change);
 
 		if (change.hasFieldChanges()) {

--
Gitblit v1.9.1