From f5d5680b85ff5df5a0a9fc8cf7180401fd4455b2 Mon Sep 17 00:00:00 2001 From: Paul Martin Date: Sat, 18 Oct 2014 17:56:43 +0100 Subject: [PATCH] New Ticket Type - Maintenance + Indended for identifiying and loggin maintenance of development tools and systems to provide an integrated means to satisfy ISO requirements + Improved alignment of query icons via fixed width attribute --- .../java/com/gitblit/models/TicketModel.java | 4 ++-- .../gitblit/wicket/GitBlitWebApp.properties | 1 + .../java/com/gitblit/wicket/TicketsUI.java | 3 +++ .../gitblit/wicket/pages/MyTicketsPage.html | 21 ++++++++++--------- .../gitblit/wicket/pages/MyTicketsPage.java | 10 +++++++++ .../com/gitblit/wicket/pages/TicketsPage.html | 19 +++++++++-------- .../com/gitblit/wicket/pages/TicketsPage.java | 10 +++++++++ 7 files changed, 47 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/gitblit/models/TicketModel.java b/src/main/java/com/gitblit/models/TicketModel.java index a4880ead..9bdb2606 100644 --- a/src/main/java/com/gitblit/models/TicketModel.java +++ b/src/main/java/com/gitblit/models/TicketModel.java @@ -1187,12 +1187,12 @@ public class TicketModel implements Serializable, Comparable { } public static enum Type { - Enhancement, Task, Bug, Proposal, Question; + Enhancement, Task, Bug, Proposal, Question, Maintenance; public static Type defaultType = Task; public static Type [] choices() { - return new Type [] { Enhancement, Task, Bug, Question }; + return new Type [] { Enhancement, Task, Bug, Question, Maintenance }; } @Override diff --git a/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties index eb92e2d2..2760f85f 100644 --- a/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties @@ -561,6 +561,7 @@ gb.bugTickets = bugs gb.enhancementTickets = enhancements gb.taskTickets = tasks gb.questionTickets = questions +gb.maintenanceTickets = maintenance gb.requestTickets = enhancements & tasks gb.yourCreatedTickets = created by you gb.yourWatchedTickets = watched by you diff --git a/src/main/java/com/gitblit/wicket/TicketsUI.java b/src/main/java/com/gitblit/wicket/TicketsUI.java index 0eff4cff..347ac44d 100644 --- a/src/main/java/com/gitblit/wicket/TicketsUI.java +++ b/src/main/java/com/gitblit/wicket/TicketsUI.java @@ -59,6 +59,9 @@ public class TicketsUI { case Question: WicketUtils.setCssClass(label, "fa fa-question"); break; + case Maintenance: + WicketUtils.setCssClass(label, "fa fa-cogs"); + break; default: // standard ticket WicketUtils.setCssClass(label, "fa fa-ticket"); diff --git a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html index b0bc1949..cf94f3ca 100644 --- a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html +++ b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html @@ -25,18 +25,19 @@ diff --git a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java index c207d561..1396a5e5 100644 --- a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java +++ b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java @@ -132,6 +132,16 @@ public class MyTicketsPage extends RootPage { sortBy, desc, 1))); + + add(new BookmarkablePageLink("maintenanceQuery", MyTicketsPage.class, + queryParameters( + Lucene.type.matches(TicketModel.Type.Maintenance.name()), + milestoneParam, + statiiParam, + assignedToParam, + sortBy, + desc, + 1))); add(new BookmarkablePageLink("resetQuery", MyTicketsPage.class, queryParameters( diff --git a/src/main/java/com/gitblit/wicket/pages/TicketsPage.html b/src/main/java/com/gitblit/wicket/pages/TicketsPage.html index 3a3d977a..c686d1ff 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketsPage.html +++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.html @@ -31,17 +31,18 @@
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java index 658cddec..745cabf4 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java @@ -272,6 +272,16 @@ public class TicketsPage extends RepositoryPage { sortBy, desc, 1))); + + add(new BookmarkablePageLink("maintenanceQuery", TicketsPage.class, + queryParameters( + Lucene.type.matches(TicketModel.Type.Maintenance.name()), + milestoneParam, + statiiParam, + assignedToParam, + sortBy, + desc, + 1))); add(new BookmarkablePageLink("resetQuery", TicketsPage.class, queryParameters( -- 2.39.5