]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4624 rename issue transition "mute" to "wontfix" and resolution "MUTED" to...
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 22 Jan 2015 16:06:09 +0000 (17:06 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 22 Jan 2015 16:55:18 +0000 (17:55 +0100)
server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets.json
server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_zero_facets.json
server/sonar-web/src/main/coffee/issues/facets/resolution-facet.coffee
sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java
sonar-plugin-api/src/main/java/org/sonar/api/issue/DefaultTransitions.java
sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java

index 20a42e280a08e2466ef4e54551293c10253abd5e..cce233e23e7f91b2170dfa469fcf77ba92b454db 100644 (file)
@@ -82,7 +82,7 @@
           "count": 0
         },
         {
-          "val": "MUTED",
+          "val": "WONTFIX",
           "count": 0
         }
       ]
index d4debbcb81f16b1025614013eb21277b2c74927f..693bbe898bfedb1cd747bcd3694d3097cb744fc4 100644 (file)
@@ -82,7 +82,7 @@
           "count": 0
         },
         {
-          "val": "MUTED",
+          "val": "WONTFIX",
           "count": 0
         }
       ]
index 267cf954c5a5c5be9a004157d74c1679ff3ae913..a18b5b1c0b1294339a45229107414bda6c95d3f5 100644 (file)
@@ -36,6 +36,6 @@ define [
 
 
     sortValues: (values) ->
-      order = ['', 'FIXED', 'FALSE-POSITIVE', 'MUTED', 'REMOVED']
+      order = ['', 'FIXED', 'FALSE-POSITIVE', 'WONTFIX', 'REMOVED']
       _.sortBy values, (v) -> order.indexOf v.val
 
index c12bce14343ead8d18152a5660b81e876e34c8e5..f1b66748c152e03140ff2988fd570b0e6660586d 100644 (file)
@@ -106,20 +106,20 @@ public class IssueWorkflow implements BatchComponent, ServerComponent, Startable
         .requiredProjectPermission(UserRole.ISSUE_ADMIN)
         .build())
 
-      // resolve as muted
-      .transition(Transition.builder(DefaultTransitions.MUTE)
+      // resolve as won't fix
+      .transition(Transition.builder(DefaultTransitions.WONT_FIX)
         .from(Issue.STATUS_OPEN).to(Issue.STATUS_RESOLVED)
-        .functions(new SetResolution(Issue.RESOLUTION_MUTED), SetAssignee.UNASSIGN)
+        .functions(new SetResolution(Issue.RESOLUTION_WONT_FIX), SetAssignee.UNASSIGN)
         .requiredProjectPermission(UserRole.ISSUE_ADMIN)
         .build())
-      .transition(Transition.builder(DefaultTransitions.MUTE)
+      .transition(Transition.builder(DefaultTransitions.WONT_FIX)
         .from(Issue.STATUS_REOPENED).to(Issue.STATUS_RESOLVED)
-        .functions(new SetResolution(Issue.RESOLUTION_MUTED), SetAssignee.UNASSIGN)
+        .functions(new SetResolution(Issue.RESOLUTION_WONT_FIX), SetAssignee.UNASSIGN)
         .requiredProjectPermission(UserRole.ISSUE_ADMIN)
         .build())
-      .transition(Transition.builder(DefaultTransitions.MUTE)
+      .transition(Transition.builder(DefaultTransitions.WONT_FIX)
           .from(Issue.STATUS_CONFIRMED).to(Issue.STATUS_RESOLVED)
-          .functions(new SetResolution(Issue.RESOLUTION_MUTED), SetAssignee.UNASSIGN)
+          .functions(new SetResolution(Issue.RESOLUTION_WONT_FIX), SetAssignee.UNASSIGN)
           .requiredProjectPermission(UserRole.ISSUE_ADMIN)
           .build()
       );
index 573613916fa34e1ba6fe2582837190facec5c1f6..92e7d89d03d77452eac41204c33ac126ad80579b 100644 (file)
@@ -659,7 +659,7 @@ issue.transition.resolve=Resolve
 issue.transition.falsepositive=False Positive
 issue.transition.reopen=Reopen
 issue.transition.close=Close
-issue.transition.mute=Mute
+issue.transition.wontfix=Won't fix
 issue.set_severity=Change Severity
 issue.set_severity.submit=Change Severity
 issue.do_plan=Plan
@@ -674,7 +674,7 @@ issue.status.CONFIRMED=Confirmed
 issue.status.CLOSED=Closed
 issue.resolution.FALSE-POSITIVE=False Positive
 issue.resolution.FIXED=Fixed
-issue.resolution.MUTED=Muted
+issue.resolution.WONTFIX=Won't fix
 issue.resolution.REMOVED=Removed
 issue.updated=Updated:
 issue.planned_for_x=Planned for {0}
index 46d0db5ba0d5bdcb2cae045fa0ee893d9a1c05e0..1eb2430420a8c5705aff1f4751ecaefb5035d0d2 100644 (file)
@@ -72,7 +72,7 @@ public class IssueWorkflowTest {
 
     DefaultIssue issue = new DefaultIssue().setStatus(Issue.STATUS_OPEN);
     List<Transition> transitions = workflow.outTransitions(issue);
-    assertThat(keys(transitions)).containsOnly("confirm", "falsepositive", "resolve", "mute");
+    assertThat(keys(transitions)).containsOnly("confirm", "falsepositive", "resolve", "wontfix");
   }
 
   @Test
@@ -81,7 +81,7 @@ public class IssueWorkflowTest {
 
     DefaultIssue issue = new DefaultIssue().setStatus(Issue.STATUS_CONFIRMED);
     List<Transition> transitions = workflow.outTransitions(issue);
-    assertThat(keys(transitions)).containsOnly("unconfirm", "falsepositive", "resolve", "mute");
+    assertThat(keys(transitions)).containsOnly("unconfirm", "falsepositive", "resolve", "wontfix");
   }
 
   @Test
@@ -99,7 +99,7 @@ public class IssueWorkflowTest {
 
     DefaultIssue issue = new DefaultIssue().setStatus(Issue.STATUS_REOPENED);
     List<Transition> transitions = workflow.outTransitions(issue);
-    assertThat(keys(transitions)).containsOnly("confirm", "mute", "resolve", "falsepositive", "mute");
+    assertThat(keys(transitions)).containsOnly("confirm", "resolve", "falsepositive", "wontfix");
   }
 
   @Test
@@ -250,7 +250,7 @@ public class IssueWorkflowTest {
   }
 
   @Test
-  public void mute() throws Exception {
+  public void wont_fix() throws Exception {
     DefaultIssue issue = new DefaultIssue()
       .setKey("ABCDE")
       .setStatus(Issue.STATUS_OPEN)
@@ -258,9 +258,9 @@ public class IssueWorkflowTest {
       .setAssignee("morgan");
 
     workflow.start();
-    workflow.doTransition(issue, DefaultTransitions.MUTE, IssueChangeContext.createScan(new Date()));
+    workflow.doTransition(issue, DefaultTransitions.WONT_FIX, IssueChangeContext.createScan(new Date()));
 
-    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_MUTED);
+    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_WONT_FIX);
     assertThat(issue.status()).isEqualTo(Issue.STATUS_RESOLVED);
 
     // should remove assignee
@@ -282,7 +282,7 @@ public class IssueWorkflowTest {
       Transition.create("confirm", "OPEN", "CONFIRMED"),
       Transition.create("resolve", "OPEN", "RESOLVED"),
       Transition.create("falsepositive", "OPEN", "RESOLVED"),
-      Transition.create("mute", "OPEN", "RESOLVED")
+      Transition.create("wontfix", "OPEN", "RESOLVED")
     );
 
     workflow.doTransition(issue, "resolve", mock(IssueChangeContext.class));
@@ -313,7 +313,7 @@ public class IssueWorkflowTest {
       Transition.create("confirm", "OPEN", "CONFIRMED"),
       Transition.create("resolve", "OPEN", "RESOLVED"),
       Transition.create("falsepositive", "OPEN", "RESOLVED"),
-      Transition.create("mute", "OPEN", "RESOLVED")
+      Transition.create("wontfix", "OPEN", "RESOLVED")
     );
 
     workflow.doTransition(issue, "confirm", mock(IssueChangeContext.class));
@@ -324,7 +324,7 @@ public class IssueWorkflowTest {
       Transition.create("unconfirm", "CONFIRMED", "REOPENED"),
       Transition.create("resolve", "CONFIRMED", "RESOLVED"),
       Transition.create("falsepositive", "CONFIRMED", "RESOLVED"),
-      Transition.create("mute", "CONFIRMED", "RESOLVED")
+      Transition.create("wontfix", "CONFIRMED", "RESOLVED")
     );
 
     // keep confirmed and unresolved
index b8de744b26608130bb2cc226cfa105d888985b25..7b1e01e06735866a54afe5c1e65d4733fa758784 100644 (file)
@@ -38,10 +38,10 @@ public interface DefaultTransitions {
   /**
    * @since 5.1
    */
-  String MUTE = "mute";
+  String WONT_FIX = "wontfix";
 
   /**
    * @since 4.4
    */
-  List<String> ALL = ImmutableList.of(CONFIRM, UNCONFIRM, REOPEN, RESOLVE, FALSE_POSITIVE, MUTE, CLOSE);
+  List<String> ALL = ImmutableList.of(CONFIRM, UNCONFIRM, REOPEN, RESOLVE, FALSE_POSITIVE, WONT_FIX, CLOSE);
 }
index 391830e4131644d4ab0ae3a0299315321f73f1d5..778b57135c74614840bb6f11521e620ff48a48fc 100644 (file)
@@ -66,9 +66,9 @@ public interface Issue extends Serializable {
    * Issue is irrelevant in the context and was muted by user.
    * @since 5.1
    */
-  String RESOLUTION_MUTED = "MUTED";
+  String RESOLUTION_WONT_FIX = "WONTFIX";
 
-  List<String> RESOLUTIONS = ImmutableList.of(RESOLUTION_FALSE_POSITIVE, RESOLUTION_MUTED, RESOLUTION_FIXED, RESOLUTION_REMOVED);
+  List<String> RESOLUTIONS = ImmutableList.of(RESOLUTION_FALSE_POSITIVE, RESOLUTION_WONT_FIX, RESOLUTION_FIXED, RESOLUTION_REMOVED);
 
   /**
    * Return all available statuses