]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4329 unconfirm transition should lead to REOPENED status instead of OPEN
authorJulien Lancelot <julien.lancelot@gmail.com>
Thu, 30 May 2013 17:23:04 +0000 (19:23 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Thu, 30 May 2013 17:23:04 +0000 (19:23 +0200)
sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java
sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java

index ef38b89798a32d5500624efb7e4a182a7fe1e2f2..2211df866b433e25daa6e6c266fd56e5ef4ef4c1 100644 (file)
@@ -57,7 +57,7 @@ public class IssueWorkflow implements BatchComponent, ServerComponent, Startable
         .functions(new SetResolution(null))
         .build())
       .transition(Transition.builder(DefaultTransitions.UNCONFIRM)
-        .from(Issue.STATUS_CONFIRMED).to(Issue.STATUS_OPEN)
+        .from(Issue.STATUS_CONFIRMED).to(Issue.STATUS_REOPENED)
         .functions(new SetResolution(null))
         .build())
       .transition(Transition.builder(DefaultTransitions.RESOLVE)
index 2be74b192f927568877ad9c0ad2096be45e8ca7a..b73544e805355fd4c17c0141e618acf8a029fb3c 100644 (file)
@@ -262,7 +262,7 @@ public class IssueWorkflowTest {
     assertThat(issue.status()).isEqualTo("CONFIRMED");
 
     assertThat(workflow.outTransitions(issue)).containsOnly(
-      Transition.create("unconfirm", "CONFIRMED", "OPEN"),
+      Transition.create("unconfirm", "CONFIRMED", "REOPENED"),
       Transition.create("resolve", "CONFIRMED", "RESOLVED")
     );
 
@@ -274,7 +274,7 @@ public class IssueWorkflowTest {
     // unconfirm
     workflow.doTransition(issue, "unconfirm", mock(IssueChangeContext.class));
     assertThat(issue.resolution()).isNull();
-    assertThat(issue.status()).isEqualTo("OPEN");
+    assertThat(issue.status()).isEqualTo("REOPENED");
   }
 
   @Test