From 91eb3220ebe8a52f7a4485a649685c29455bd8b7 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 30 May 2013 19:23:04 +0200 Subject: [PATCH] SONAR-4329 unconfirm transition should lead to REOPENED status instead of OPEN --- .../java/org/sonar/core/issue/workflow/IssueWorkflow.java | 2 +- .../java/org/sonar/core/issue/workflow/IssueWorkflowTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java b/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java index ef38b89798a..2211df866b4 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java @@ -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) diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java index 2be74b192f9..b73544e8053 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java @@ -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 -- 2.39.5