From 706251150991341c004b86831154970402b515e5 Mon Sep 17 00:00:00 2001 From: James Moger Date: Tue, 11 Mar 2014 10:22:33 -0400 Subject: [PATCH] Add closed status for milestones and abandoned status for tickets --- src/main/java/com/gitblit/models/TicketModel.java | 10 ++++++---- .../java/com/gitblit/wicket/pages/TicketBasePage.java | 2 ++ .../java/com/gitblit/wicket/pages/TicketsPage.java | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gitblit/models/TicketModel.java b/src/main/java/com/gitblit/models/TicketModel.java index 5fd1ed95..fa09ec59 100644 --- a/src/main/java/com/gitblit/models/TicketModel.java +++ b/src/main/java/com/gitblit/models/TicketModel.java @@ -1201,13 +1201,15 @@ public class TicketModel implements Serializable, Comparable { } public static enum Status { - New, Open, Resolved, Fixed, Merged, Wontfix, Declined, Duplicate, Invalid, On_Hold; + New, Open, Closed, Resolved, Fixed, Merged, Wontfix, Declined, Duplicate, Invalid, Abandoned, On_Hold; - public static Status [] requestWorkflow = { Open, Resolved, Declined, Duplicate, Invalid, On_Hold }; + public static Status [] requestWorkflow = { Open, Resolved, Declined, Duplicate, Invalid, Abandoned, On_Hold }; - public static Status [] bugWorkflow = { Open, Fixed, Wontfix, Duplicate, Invalid, On_Hold }; + public static Status [] bugWorkflow = { Open, Fixed, Wontfix, Duplicate, Invalid, Abandoned, On_Hold }; - public static Status [] proposalWorkflow = { Open, Resolved, Declined, On_Hold}; + public static Status [] proposalWorkflow = { Open, Resolved, Declined, Abandoned, On_Hold }; + + public static Status [] milestoneWorkflow = { Open, Closed, Abandoned, On_Hold }; @Override public String toString() { diff --git a/src/main/java/com/gitblit/wicket/pages/TicketBasePage.java b/src/main/java/com/gitblit/wicket/pages/TicketBasePage.java index 3736cddf..60fa6381 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketBasePage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketBasePage.java @@ -73,6 +73,7 @@ public abstract class TicketBasePage extends RepositoryPage { case Duplicate: case Invalid: case Wontfix: + case Abandoned: css = "aui-lozenge-error"; break; case Fixed: @@ -101,6 +102,7 @@ public abstract class TicketBasePage extends RepositoryPage { case Duplicate: case Invalid: case Wontfix: + case Abandoned: css = "resolution-error"; break; case Fixed: diff --git a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java index 489ed1ac..3e8e4edd 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java @@ -397,7 +397,8 @@ public class TicketsPage extends TicketBasePage { add(new BookmarkablePageLink("allTickets", TicketsPage.class, queryParameters(queryParam, milestoneParam, null, assignedToParam, sortBy, desc, 1))); // by status - List statii = Arrays.asList(Status.values()); + List statii = new ArrayList(Arrays.asList(Status.values())); + statii.remove(Status.Closed); ListDataProvider resolutionsDp = new ListDataProvider(statii); DataView statiiLinks = new DataView("statii", resolutionsDp) { private static final long serialVersionUID = 1L; -- 2.39.5