]> source.dussan.org Git - vaadin-framework.git/commitdiff
Show badges in release notes (#13612)
authorArtur Signell <artur@vaadin.com>
Fri, 9 May 2014 17:49:51 +0000 (20:49 +0300)
committerVaadin Code Review <review@vaadin.com>
Mon, 12 May 2014 05:06:51 +0000 (05:06 +0000)
Change-Id: I6109cda80251b343999b75f51ffecf6a9bbbd6a2

WebContent/css/styles.css
WebContent/release-notes.html
buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java

index 9a5ddc74c10cc102bcb8c15a61c43b893a9c5326..9bd03ae8bcfe7d302f2c2a2878fdb97e52d2c81e 100644 (file)
@@ -439,3 +439,37 @@ img {
        margin: 0em 2em .8em 2em;
        float: right;
        }
+       
+span.fv {
+       padding: 2px 10px;
+       margin-right: 5px;
+       color: rgb(71,174,67);
+       font-weight: bold;
+}
+td.fv {
+       background-color: rgb(206,247,205);
+       text-align: center;
+       border-radius: 3px;
+       font-size: 12px;
+       line-height: 1;
+       font-weight: bold;
+}
+td.bfp {
+       text-align: center;
+       color: rgb(37,114,146);
+       border-radius: 3px;
+
+       padding: 2px 10px;
+       margin-right: 5px;
+       background-color: rgb(216,245,255);
+       font-size: 12px;
+       line-height: 1;
+       font-weight: bold;
+}
+.ticket {
+       text-align: right;
+       padding-left: 5px;
+}
+.pad {
+       padding-left: 5px;
+}
\ No newline at end of file
index 5b9f15f06b3658849a286c380eda04032bae0ff9..f912f9924edc75753d205d3e608bb7d9eecc909c 100644 (file)
 
         <p>This release includes the following closed issues:</p>
 
-        <ul>@release-notes-tickets@
-        </ul>
-
+        <table>
+        @release-notes-tickets@
+        <tr><td>&nbsp;</td><td></td></tr>
+        <tr><td class="fv"><span class="vote">Vote</span></td><td colspan="2" class="pad">Enhancements <a href=" https://vaadin.com/support">Vaadin support</a> users have voted for</td></tr>
+        <tr><td class="bfp"><span class="bfp">Priority</span></td><td colspan="2" class="pad">Defects <a href=" https://vaadin.com/support">Vaadin support</a> users have prioritized</td></tr>
+        </table>
+        <br/>
         <p>
             You can also view the <a
                 href="http://dev.vaadin.com/query?status=closed&resolution=fixed&milestone=Vaadin+@version@&order=id">list
index 4ca17443dc9d1cec98f98c4bfc1611da932e5312..6434c943526cc3623939df370a61f4ab7367b868 100644 (file)
@@ -24,8 +24,12 @@ import java.util.List;
 import org.apache.commons.io.IOUtils;
 
 public class FetchReleaseNotesTickets {
-    private static final String queryURL = "http://dev.vaadin.com/query?status=closed&amp;milestone=Vaadin+@version@&amp;resolution=fixed&amp;format=tab&amp;order=id";
-    private static final String ticketTemplate = "  <li><a href=\"http://dev.vaadin.com/ticket/@ticket@\">#@ticket@</a>: @description@</li>";
+    private static final String queryURL = "http://dev.vaadin.com/query?status=closed&amp;milestone=Vaadin+@version@&amp;resolution=fixed&amp;col=id&amp;col=summary&amp;col=owner&amp;col=type&amp;col=priority&amp;col=component&amp;col=version&amp;col=bfptime&col=fv&amp;format=tab&amp;order=id";
+    private static final String ticketTemplate = "<tr>"
+            + "@badge@" //
+            + "<td class=\"ticket\"><a href=\"http://dev.vaadin.com/ticket/@ticket@\">#@ticket@</a></td>" //
+            + "<td>@description@</td>" //
+            + "</tr>"; //
 
     public static void main(String[] args) throws IOException {
         String version = System.getProperty("vaadin.version");
@@ -52,8 +56,16 @@ public class FetchReleaseNotesTickets {
                 summary = summary.substring(1, summary.length() - 1);
                 summary = summary.replace("\"\"", "\"");
             }
+            String badge = "<td></td>";
+            if (fields.length >= 8 && !fields[7].equals("")) {
+                badge = "<td class=\"bfp\"><span class=\"bfp\">Priority</span></td>";
+            } else if (fields.length >= 9 && fields[8].equalsIgnoreCase("true")) {
+                badge = "<td class=\"fv\"><span class=\"fv\">Vote</span></td>";
+            }
+
             System.out.println(ticketTemplate.replace("@ticket@", fields[0])
-                    .replace("@description@", summary));
+                    .replace("@description@", summary)
+                    .replace("@badge@", badge));
         }
         urlStream.close();
     }