]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21280 Use IssueStatus from plugin-api instead and remove old one
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>
Thu, 18 Jan 2024 14:48:14 +0000 (15:48 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 19 Jan 2024 20:02:56 +0000 (20:02 +0000)
33 files changed:
gradle.properties
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/notification/NotificationFactory.java
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IndexedIssueDto.java
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java
server/sonar-db-dao/src/test/java/org/sonar/db/issue/IndexedIssueDtoTest.java
server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDtoTest.java
server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIteratorFactoryIT.java
server/sonar-server-common/src/main/java/org/sonar/server/issue/IssueFieldsSetter.java
server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/FPOrAcceptedNotificationHandler.java
server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/IssuesChangesNotificationBuilder.java
server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/IssuesChangesNotificationSerializer.java
server/sonar-server-common/src/main/java/org/sonar/server/issue/workflow/IssueWorkflow.java
server/sonar-server-common/src/test/java/org/sonar/server/issue/IssueFieldsSetterTest.java
server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FPOrAcceptedNotificationHandlerTest.java
server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/IssuesChangesNotificationBuilderTest.java
server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java
server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java
server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java
server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/BulkChangeActionIT.java
server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/IssueUpdaterIT.java
server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionIT.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/IssueUpdater.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/measure/live/IssueCounter.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/ws/SearchResponseFormatFormatOperationTest.java
sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java
sonar-core/src/main/java/org/sonar/core/issue/status/IssueStatus.java [deleted file]
sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java [deleted file]
sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java
sonar-core/src/test/java/org/sonar/core/issue/status/IssueStatusTest.java [deleted file]

index 6179b372d11007efbfa08a12a223f1c97d63abc2..cfd534f99438318e2d3354d8917a119c05da15d4 100644 (file)
@@ -1,6 +1,6 @@
 group=org.sonarsource.sonarqube
 version=10.4
-pluginApiVersion=10.4.0.2064
+pluginApiVersion=10.5.0.2090
 description=Open source platform for continuous inspection of code quality
 projectTitle=SonarQube
 org.gradle.jvmargs=-Xmx2048m
index 4cc9c893963854dc3ee0ebd292a4cf0954da1a0f..5646cfce36a409a39b2d91efc1e54a4aa209e1fa 100644 (file)
@@ -26,6 +26,7 @@ import com.google.common.collect.Multiset;
 import java.util.HashMap;
 import java.util.Map;
 import javax.annotation.Nullable;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.rules.RuleType;
 import org.sonar.ce.task.projectanalysis.component.Component;
@@ -34,7 +35,6 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureRepository;
 import org.sonar.ce.task.projectanalysis.metric.Metric;
 import org.sonar.ce.task.projectanalysis.metric.MetricRepository;
 import org.sonar.core.issue.DefaultIssue;
-import org.sonar.core.issue.status.IssueStatus;
 
 import static org.sonar.api.issue.Issue.STATUS_CONFIRMED;
 import static org.sonar.api.issue.Issue.STATUS_OPEN;
@@ -254,9 +254,9 @@ public class IssueCounter extends IssueVisitor {
         unresolved++;
         typeBag.add(issue.type());
         severityBag.add(issue.severity());
-      } else if (IssueStatus.FALSE_POSITIVE.equals(issue.getIssueStatus())) {
+      } else if (IssueStatus.FALSE_POSITIVE.equals(issue.issueStatus())) {
         falsePositives++;
-      } else if (IssueStatus.ACCEPTED.equals(issue.getIssueStatus())) {
+      } else if (IssueStatus.ACCEPTED.equals(issue.issueStatus())) {
         accepted++;
         if (issue.impacts().values().stream().anyMatch(severity -> severity == Severity.HIGH)) {
           highImpactAccepted++;
index adae18e5dd17307bdb727d67e541f77eea38dd68..69c753e200efb11aaed9131349ff5b49af125eab 100644 (file)
@@ -27,6 +27,7 @@ import java.util.stream.Collectors;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.sonar.api.ce.ComputeEngineSide;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder;
 import org.sonar.ce.task.projectanalysis.analysis.Branch;
@@ -36,7 +37,6 @@ import org.sonar.ce.task.projectanalysis.component.TreeRootHolder;
 import org.sonar.ce.task.projectanalysis.component.TypeAwareVisitorAdapter;
 import org.sonar.ce.task.projectanalysis.issue.RuleRepository;
 import org.sonar.core.issue.DefaultIssue;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.user.UserDto;
 import org.sonar.server.issue.notification.IssuesChangesNotification;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder;
index 1c89c49d4bf624f8363d238a445cc510dd31e113..ac20921ca864c27bb90cc98025c1bcb333c1f69b 100644 (file)
@@ -26,9 +26,9 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
 import javax.annotation.CheckForNull;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
-import org.sonar.core.issue.status.IssueStatus;
 
 public final class IndexedIssueDto {
   private String issueKey = null;
index 4319a47a9375d854c7f4c40df226ecbd479bcc65..69379d6a88f7f8f420f7a9f04d2aa02af2ee8f18 100644 (file)
@@ -37,6 +37,7 @@ import javax.annotation.Nullable;
 import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 import org.jetbrains.annotations.NotNull;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rule.RuleKey;
@@ -44,7 +45,6 @@ import org.sonar.api.rules.CleanCodeAttribute;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.utils.Duration;
 import org.sonar.core.issue.DefaultIssue;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.core.util.Uuids;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.protobuf.DbIssues;
index 6eac663f61a3ae10a78470d6c5af146f78a4a735..7b86e0fe6321b5ab77ec8ce30beb4a42086b4704 100644 (file)
@@ -22,12 +22,11 @@ package org.sonar.db.issue;
 import java.util.Set;
 import org.junit.Test;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
-import org.sonar.core.issue.status.IssueStatus;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.assertj.core.groups.Tuple.tuple;
 
 public class IndexedIssueDtoTest {
index 1f65646842108165305b0bcfae6fe308d6611431..1de02d240eecd77e4b6cfe95838063a8afed3ef8 100644 (file)
@@ -29,6 +29,7 @@ import java.util.Set;
 import org.apache.commons.lang.time.DateUtils;
 import org.junit.Test;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rule.RuleKey;
@@ -36,7 +37,6 @@ import org.sonar.api.rules.CleanCodeAttribute;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.utils.Duration;
 import org.sonar.core.issue.DefaultIssue;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.core.util.UuidFactoryFast;
 import org.sonar.db.protobuf.DbIssues;
 import org.sonar.db.rule.RuleDto;
index 8689146d06bb72efaf0e71dca9cbf0313ee3f82b..174b33c1c629556af222cb13110921ac9581acc1 100644 (file)
@@ -27,8 +27,8 @@ import java.util.function.Function;
 import java.util.stream.Stream;
 import org.junit.Rule;
 import org.junit.Test;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.utils.System2;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.DbTester;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ProjectData;
index 70018358847aaffaf7a449e06cfc5ce9eb2cb557..031fcd9358b783749755684596af2c4aecb8e215 100644 (file)
@@ -31,6 +31,7 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import javax.annotation.Nullable;
 import org.sonar.api.ce.ComputeEngineSide;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rules.CleanCodeAttribute;
@@ -41,7 +42,6 @@ import org.sonar.api.utils.Duration;
 import org.sonar.core.issue.DefaultIssue;
 import org.sonar.core.issue.DefaultIssueComment;
 import org.sonar.core.issue.IssueChangeContext;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.protobuf.DbIssues;
 import org.sonar.db.user.UserDto;
 import org.sonar.db.user.UserIdDto;
@@ -263,7 +263,7 @@ public class IssueFieldsSetter {
   public boolean setIssueStatus(DefaultIssue issue, @Nullable IssueStatus previousIssueStatus, @Nullable IssueStatus newIssueStatus, IssueChangeContext context) {
     if (!Objects.equals(newIssueStatus, previousIssueStatus)) {
       //Currently, issue status is not persisted in database, but is considered as an issue change
-      issue.setFieldChange(context, ISSUE_STATUS, previousIssueStatus, issue.getIssueStatus());
+      issue.setFieldChange(context, ISSUE_STATUS, previousIssueStatus, issue.issueStatus());
       return true;
     }
     return false;
index 4720983eb731f84eb64b336baab808a0857ab11f..b39a2c70338b3424d1f7df57e0bb28a6be6ceb94 100644 (file)
@@ -29,7 +29,7 @@ import java.util.Optional;
 import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-import org.sonar.core.issue.status.IssueStatus;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue;
 import org.sonar.server.notification.EmailNotificationHandler;
 import org.sonar.server.notification.NotificationDispatcherMetadata;
index 966823de1601ecef5d1bb09d8a185594ba6998c4..8e90958bcff636c77f9a44597833c955dfb54152 100644 (file)
@@ -26,9 +26,9 @@ import java.util.Set;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import javax.annotation.concurrent.Immutable;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rules.RuleType;
-import org.sonar.core.issue.status.IssueStatus;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
index 6b74900a53f659c87f2a636ea675461eb29cd0be..d354b25ff4fef1dfedbe569d7746f671b9d650a2 100644 (file)
@@ -28,8 +28,8 @@ import java.util.stream.Collectors;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import javax.annotation.concurrent.Immutable;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.RuleKey;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Rule;
index 8cfcf92e71d63847a47dc48ca75c8dff485fcd5b..f9127dadc6ea81bc92a0d18abccfa21e8d53d301 100644 (file)
@@ -24,12 +24,12 @@ import org.sonar.api.Startable;
 import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.issue.DefaultTransitions;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.server.ServerSide;
 import org.sonar.api.web.UserRole;
 import org.sonar.core.issue.DefaultIssue;
 import org.sonar.core.issue.IssueChangeContext;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.server.issue.IssueFieldsSetter;
 
 import static com.google.common.base.Preconditions.checkArgument;
@@ -352,10 +352,10 @@ public class IssueWorkflow implements Startable {
   public boolean doManualTransition(DefaultIssue issue, String transitionKey, IssueChangeContext issueChangeContext) {
     Transition transition = stateOf(issue).transition(transitionKey);
     if (transition.supports(issue) && !transition.automatic()) {
-      IssueStatus previousIssueStatus = issue.getIssueStatus();
+      IssueStatus previousIssueStatus = issue.issueStatus();
       functionExecutor.execute(transition.functions(), issue, issueChangeContext);
       updater.setStatus(issue, transition.to(), issueChangeContext);
-      updater.setIssueStatus(issue, previousIssueStatus, issue.getIssueStatus(), issueChangeContext);
+      updater.setIssueStatus(issue, previousIssueStatus, issue.issueStatus(), issueChangeContext);
       return true;
     }
     return false;
@@ -371,10 +371,10 @@ public class IssueWorkflow implements Startable {
   public void doAutomaticTransition(DefaultIssue issue, IssueChangeContext issueChangeContext) {
     Transition transition = stateOf(issue).outAutomaticTransition(issue);
     if (transition != null) {
-      IssueStatus previousIssueStatus = issue.getIssueStatus();
+      IssueStatus previousIssueStatus = issue.issueStatus();
       functionExecutor.execute(transition.functions(), issue, issueChangeContext);
       updater.setStatus(issue, transition.to(), issueChangeContext);
-      updater.setIssueStatus(issue, previousIssueStatus, issue.getIssueStatus(), issueChangeContext);
+      updater.setIssueStatus(issue, previousIssueStatus, issue.issueStatus(), issueChangeContext);
     }
   }
 
index f1ad4940346f6aaf7f1a32f1bcb4b700fa32eb41..d6cc42df94ee12609819c9b86a4793dd8b830d6d 100644 (file)
@@ -30,6 +30,7 @@ import java.util.Set;
 import org.apache.commons.lang.time.DateUtils;
 import org.junit.Test;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rules.CleanCodeAttribute;
@@ -38,7 +39,6 @@ import org.sonar.api.utils.Duration;
 import org.sonar.core.issue.DefaultIssue;
 import org.sonar.core.issue.FieldDiffs;
 import org.sonar.core.issue.IssueChangeContext;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.protobuf.DbCommons;
 import org.sonar.db.protobuf.DbIssues;
 import org.sonar.db.protobuf.DbIssues.MessageFormattingType;
@@ -439,11 +439,11 @@ public class IssueFieldsSetterTest {
     issue.setResolution(null);
     issue.setStatus(Issue.STATUS_OPEN);
 
-    IssueStatus issueStatus = issue.getIssueStatus();
+    IssueStatus issueStatus = issue.issueStatus();
 
     underTest.setResolution(issue, Issue.RESOLUTION_WONT_FIX, context);
     underTest.setStatus(issue, Issue.STATUS_RESOLVED, context);
-    underTest.setIssueStatus(issue, issueStatus, issue.getIssueStatus(), context);
+    underTest.setIssueStatus(issue, issueStatus, issue.issueStatus(), context);
 
     FieldDiffs.Diff diff = issue.currentChange().diffs().get(IssueFieldsSetter.ISSUE_STATUS);
     assertThat(diff.oldValue()).isEqualTo(IssueStatus.OPEN);
@@ -455,8 +455,8 @@ public class IssueFieldsSetterTest {
     issue.setResolution(null);
     issue.setStatus(Issue.STATUS_OPEN);
 
-    IssueStatus issueStatus = issue.getIssueStatus();
-    underTest.setIssueStatus(issue, issueStatus, issue.getIssueStatus(), context);
+    IssueStatus issueStatus = issue.issueStatus();
+    underTest.setIssueStatus(issue, issueStatus, issue.issueStatus(), context);
 
     assertThat(issue.currentChange()).isNull();
   }
@@ -466,11 +466,11 @@ public class IssueFieldsSetterTest {
     issue.setResolution(null);
     issue.setStatus(Issue.STATUS_TO_REVIEW);
 
-    IssueStatus issueStatus = issue.getIssueStatus();
+    IssueStatus issueStatus = issue.issueStatus();
 
     issue.setResolution(Issue.RESOLUTION_SAFE);
     issue.setStatus(Issue.STATUS_REVIEWED);
-    underTest.setIssueStatus(issue, issueStatus, issue.getIssueStatus(), context);
+    underTest.setIssueStatus(issue, issueStatus, issue.issueStatus(), context);
 
     assertThat(issue.currentChange()).isNull();
   }
index bc2c63f1731964d57dae0b30cacb578e85274413..aae3d2fb1379a3da7783c8d997dc66c61cbd1c6f 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 import org.sonar.api.issue.Issue;
-import org.sonar.core.issue.status.IssueStatus;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.server.issue.notification.FPOrAcceptedNotification.FpPrAccepted;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Change;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue;
index 80d0099019c45afabd218a90999c2ac659d44828..60889bfae3e4eeaa875999bf95dbcd64238ca0a4 100644 (file)
@@ -28,10 +28,10 @@ import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.utils.System2;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.AnalysisChange;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue;
 import org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project;
index df616a13ebcf672681791463b56b586e87b01611..79b9982ffa6d7d18c0a6d4a05343c6cf44fb34d8 100644 (file)
@@ -68,6 +68,7 @@ import org.elasticsearch.search.builder.SearchSourceBuilder;
 import org.elasticsearch.search.sort.FieldSortBuilder;
 import org.joda.time.Duration;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.rules.CleanCodeAttributeCategory;
@@ -77,7 +78,6 @@ import org.sonar.api.server.rule.RulesDefinition.OwaspTop10Version;
 import org.sonar.api.server.rule.RulesDefinition.PciDssVersion;
 import org.sonar.api.utils.DateUtils;
 import org.sonar.api.utils.System2;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.server.es.EsClient;
 import org.sonar.server.es.EsUtils;
 import org.sonar.server.es.SearchOptions;
@@ -133,6 +133,7 @@ import static org.sonar.server.issue.index.IssueIndex.Facet.DIRECTORIES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.FILES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.IMPACT_SEVERITY;
 import static org.sonar.server.issue.index.IssueIndex.Facet.IMPACT_SOFTWARE_QUALITY;
+import static org.sonar.server.issue.index.IssueIndex.Facet.ISSUE_STATUSES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.LANGUAGES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.OWASP_ASVS_40;
 import static org.sonar.server.issue.index.IssueIndex.Facet.OWASP_TOP_10;
@@ -145,7 +146,6 @@ import static org.sonar.server.issue.index.IssueIndex.Facet.RULES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.SANS_TOP_25;
 import static org.sonar.server.issue.index.IssueIndex.Facet.SCOPES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.SEVERITIES;
-import static org.sonar.server.issue.index.IssueIndex.Facet.ISSUE_STATUSES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.SONARSOURCE_SECURITY;
 import static org.sonar.server.issue.index.IssueIndex.Facet.STATUSES;
 import static org.sonar.server.issue.index.IssueIndex.Facet.TAGS;
@@ -171,6 +171,7 @@ import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_KEY;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_LANGUAGE;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_LINE;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_NEW_CODE_REFERENCE;
+import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_NEW_STATUS;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_OWASP_ASVS_40;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_OWASP_TOP_10;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_OWASP_TOP_10_2021;
@@ -183,7 +184,6 @@ import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_SANS
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_SCOPE;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_SEVERITY;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_SEVERITY_VALUE;
-import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_NEW_STATUS;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_SQ_SECURITY_CATEGORY;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_STATUS;
 import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_ISSUE_TAGS;
@@ -206,6 +206,7 @@ import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_DIRECTORIES
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_FILES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_IMPACT_SEVERITIES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_IMPACT_SOFTWARE_QUALITIES;
+import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ISSUE_STATUSES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_LANGUAGES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_OWASP_ASVS_40;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_OWASP_TOP_10;
@@ -217,7 +218,6 @@ import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_RULES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_SANS_TOP_25;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_SCOPES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_SEVERITIES;
-import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ISSUE_STATUSES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_SONARSOURCE_SECURITY;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_STATUSES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_TAGS;
index 35674e873282cfac92d3733118767caa5c0c04b5..9827027c6e04a233df411f93c21a9e7e128670dc 100644 (file)
@@ -26,10 +26,10 @@ import java.util.Map;
 import java.util.Set;
 import org.elasticsearch.action.search.SearchResponse;
 import org.junit.Test;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.server.rule.RulesDefinition.OwaspAsvsVersion;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.rule.RuleDto;
 import org.sonar.server.es.Facets;
index 714c22a75cedf5cad60426baa16bc653c1741649..66113bbf80b157b7feb75f558a6d640a711fc112 100644 (file)
@@ -26,9 +26,9 @@ import java.util.Set;
 import org.assertj.core.api.Fail;
 import org.junit.Test;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.rules.RuleType;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.rule.RuleDto;
 import org.sonar.server.es.SearchOptions;
index bf876c369bfb800bb883a0aedda67d936c94bbe4..cbda06ae6a1c1800842ba2c4c10bf7da9bc1053a 100644 (file)
@@ -29,10 +29,10 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.sonar.api.impl.utils.TestSystem2;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.api.utils.System2;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.core.util.SequenceUuidFactory;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbTester;
index 837974e7fa066feb3152649339bd7b4ed1c37578..5274c6961222b4df7a20cd89ce4cd16ba0320c23 100644 (file)
@@ -157,7 +157,7 @@ public class IssueUpdaterIT {
     assertThat(changedIssue.getKey()).isEqualTo(issue.key());
     assertThat(changedIssue.getNewStatus()).isEqualTo(issue.status());
     assertThat(changedIssue.getOldIssueStatus()).contains(originalIssueDto.getIssueStatus());
-    assertThat(changedIssue.getNewIssueStatus()).contains(issue.getIssueStatus());
+    assertThat(changedIssue.getNewIssueStatus()).contains(issue.issueStatus());
     assertThat(changedIssue.getAssignee()).contains(userOf(assignee));
     assertThat(changedIssue.getRule()).isEqualTo(ruleOf(rule));
     assertThat(changedIssue.getProject()).isEqualTo(projectOf(project));
index 57bf527f6b83491f8464aa9923527d5aee4ed7e1..64359dda0ddfb626527a5d1d675e986bfd89e3c9 100644 (file)
@@ -37,6 +37,7 @@ import java.util.stream.Stream;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.resources.Languages;
 import org.sonar.api.rule.RuleKey;
@@ -48,7 +49,6 @@ import org.sonar.api.server.ws.WebService;
 import org.sonar.api.utils.Durations;
 import org.sonar.api.utils.System2;
 import org.sonar.api.web.UserRole;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.core.util.UuidFactoryFast;
 import org.sonar.core.util.Uuids;
 import org.sonar.db.DbClient;
@@ -145,9 +145,9 @@ import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_HIDE_COMMEN
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_IMPACT_SEVERITIES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_IMPACT_SOFTWARE_QUALITIES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_IN_NEW_CODE_PERIOD;
+import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ISSUE_STATUSES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_PULL_REQUEST;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_RULES;
-import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ISSUE_STATUSES;
 import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_STATUSES;
 
 public class SearchActionIT {
index 73aecd58bf319adcb76d546a2bae4c700fcedaaf..8e61d80bf9c98e6120f26d8ca18672faff328fca 100644 (file)
@@ -338,7 +338,7 @@ public class BulkChangeAction implements IssuesWsAction {
     Optional<UserDto> assignee = Optional.ofNullable(issue.assignee()).map(userDtoByUuid::get);
     return new ChangedIssue.Builder(issue.key())
       .setNewStatus(issue.status())
-      .setNewIssueStatus(issue.getIssueStatus())
+      .setNewIssueStatus(issue.issueStatus())
       .setOldIssueStatus(oldIssueDto.getIssueStatus())
       .setAssignee(assignee.map(u -> new User(u.getUuid(), u.getLogin(), u.getName())).orElse(null))
       .setRule(new IssuesChangesNotificationBuilder.Rule(ruleDefinitionDto.getKey(), RuleType.valueOfNullable(ruleDefinitionDto.getType()), ruleDefinitionDto.getName()))
index 92af76a9764f3d8f2ceb34b7855639f2bd474504..29249c93c482544a2e1d86566af16461df60fde2 100644 (file)
@@ -23,12 +23,12 @@ import java.util.Date;
 import java.util.List;
 import java.util.Optional;
 import javax.annotation.Nullable;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rules.RuleType;
 import org.sonar.core.issue.DefaultIssue;
 import org.sonar.core.issue.IssueChangeContext;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.component.BranchDto;
index 17ad80ee46b786e2d1004355caca174142df592b..01db728b05ccd85eb7efa51786b1f7dca46eaafc 100644 (file)
@@ -34,6 +34,7 @@ import org.apache.lucene.search.TotalHits;
 import org.elasticsearch.action.search.SearchResponse;
 import org.elasticsearch.search.SearchHit;
 import org.sonar.api.issue.DefaultTransitions;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.rules.CleanCodeAttributeCategory;
@@ -45,7 +46,6 @@ import org.sonar.api.server.ws.WebService;
 import org.sonar.api.server.ws.WebService.Param;
 import org.sonar.api.utils.Paging;
 import org.sonar.api.utils.System2;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.user.UserDto;
index bcc7b5b6a17152648ff7144f6068a88556174a08..5db49b6cff6fa0d0bf8936301ecf33df46ed57a4 100644 (file)
@@ -28,6 +28,7 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
 import java.util.stream.Collectors;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.resources.Language;
 import org.sonar.api.resources.Languages;
 import org.sonar.api.rule.RuleKey;
@@ -37,7 +38,6 @@ import org.sonar.api.utils.DateUtils;
 import org.sonar.api.utils.Duration;
 import org.sonar.api.utils.Durations;
 import org.sonar.api.utils.Paging;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.component.BranchDto;
 import org.sonar.db.component.BranchType;
 import org.sonar.db.component.ComponentDto;
index 4ea95fd5b1ecc42c6bd89553ce90426b2e2613da..a4fc50a9b7f53874a7f566e9eb9d12efbe93790a 100644 (file)
@@ -25,9 +25,9 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
 import javax.annotation.Nullable;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.rules.RuleType;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.issue.IssueGroupDto;
 import org.sonar.db.rule.SeverityUtil;
 
index 55b08f20eab751e13a109a32087bf41db1ad731c..00adc638340f61b14090c2149a7a426e6a29bd41 100644 (file)
@@ -29,11 +29,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.resources.Languages;
 import org.sonar.api.rules.CleanCodeAttribute;
 import org.sonar.api.utils.Duration;
 import org.sonar.api.utils.Durations;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.db.DbTester;
 import org.sonar.db.component.BranchDto;
 import org.sonar.db.component.BranchType;
index 8d8096727dedce9b9c8db0d14201c0a89cfd0ce6..0ca4cab45450e3dbabdd298df4987e02cdd68918 100644 (file)
@@ -42,13 +42,13 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.rules.CleanCodeAttribute;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.utils.Duration;
-import org.sonar.core.issue.status.IssueStatus;
 import org.sonar.core.issue.tracking.Trackable;
 
 import static org.sonar.api.utils.DateUtils.truncateToSeconds;
@@ -345,7 +345,8 @@ public class DefaultIssue implements Issue, Trackable, org.sonar.api.ce.measure.
   }
 
   @Nullable
-  public IssueStatus getIssueStatus() {
+  @Override
+  public IssueStatus issueStatus() {
     return IssueStatus.of(status, resolution);
   }
 
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/status/IssueStatus.java b/sonar-core/src/main/java/org/sonar/core/issue/status/IssueStatus.java
deleted file mode 100644 (file)
index d49f35c..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2024 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.core.issue.status;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.sonar.api.issue.Issue;
-
-public enum IssueStatus {
-
-
-  OPEN,
-
-  @Deprecated(since = "10.4")
-  /*
-   * @deprecated use {@link IssueStatus#ACCEPTED} instead
-   */
-  CONFIRMED,
-  FALSE_POSITIVE,
-  ACCEPTED,
-  FIXED;
-
-  private static final Logger LOGGER = LoggerFactory.getLogger(IssueStatus.class);
-
-  @CheckForNull
-  public static IssueStatus of(@Nullable String status, @Nullable String resolution) {
-
-    //null status is not supposed to happen, but since it is nullable in database, we want the mapping to be resilient.
-    if (status == null) {
-      LOGGER.warn("Missing status, falling back to {}", IssueStatus.OPEN);
-      return IssueStatus.OPEN;
-    }
-
-    switch (status) {
-      case Issue.STATUS_OPEN, Issue.STATUS_REOPENED:
-        return IssueStatus.OPEN;
-      case Issue.STATUS_CONFIRMED:
-        return IssueStatus.CONFIRMED;
-      case Issue.STATUS_CLOSED:
-        return IssueStatus.FIXED;
-      // Security hotspot should not return issue status as they are deprecated.
-      case Issue.STATUS_REVIEWED, Issue.STATUS_TO_REVIEW:
-        return null;
-      default:
-    }
-    if (Issue.STATUS_RESOLVED.equals(status) && resolution != null) {
-      switch (resolution) {
-        case Issue.RESOLUTION_FALSE_POSITIVE:
-          return IssueStatus.FALSE_POSITIVE;
-        case Issue.RESOLUTION_WONT_FIX:
-          return IssueStatus.ACCEPTED;
-        case Issue.RESOLUTION_FIXED:
-          return IssueStatus.FIXED;
-        default:
-      }
-    }
-
-
-    LOGGER.warn("Can't find mapped issue status for status '{}' and resolution '{}'", status, resolution);
-    return null;
-  }
-}
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java b/sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java
deleted file mode 100644 (file)
index 8923fa1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2024 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.core.issue.status;
-
-import javax.annotation.ParametersAreNonnullByDefault;
index cfb795fc1a4422d3fbdd71a034db3bf1fe35ee78..2c97f6f2b668bf67e6fd85a1392694f7a5ff0181 100644 (file)
@@ -24,10 +24,10 @@ import java.util.Map;
 import org.apache.commons.lang.StringUtils;
 import org.junit.Test;
 import org.sonar.api.issue.Issue;
+import org.sonar.api.issue.IssueStatus;
 import org.sonar.api.issue.impact.Severity;
 import org.sonar.api.issue.impact.SoftwareQuality;
 import org.sonar.api.utils.Duration;
-import org.sonar.core.issue.status.IssueStatus;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -309,7 +309,7 @@ public class DefaultIssueTest {
     issue.setStatus(Issue.STATUS_RESOLVED);
     issue.setResolution(Issue.RESOLUTION_FIXED);
 
-    assertThat(issue.getIssueStatus()).isEqualTo(IssueStatus.FIXED);
+    assertThat(issue.issueStatus()).isEqualTo(IssueStatus.FIXED);
   }
 
   @Test
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/status/IssueStatusTest.java b/sonar-core/src/test/java/org/sonar/core/issue/status/IssueStatusTest.java
deleted file mode 100644 (file)
index 032127c..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2024 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.core.issue.status;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.api.issue.Issue;
-import org.sonar.api.testfixtures.log.LogAndArguments;
-import org.sonar.api.testfixtures.log.LogTester;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class IssueStatusTest {
-
-  @Rule
-  public LogTester logTester = new LogTester();
-
-  @Test
-  public void of_shouldMapToCorrectIssueStatus() {
-    assertThat(IssueStatus.of(Issue.STATUS_RESOLVED, Issue.RESOLUTION_FIXED))
-      .isEqualTo(IssueStatus.FIXED);
-
-    assertThat(IssueStatus.of(Issue.STATUS_CONFIRMED, null))
-      .isEqualTo(IssueStatus.CONFIRMED);
-
-    assertThat(IssueStatus.of(Issue.STATUS_RESOLVED, Issue.RESOLUTION_FALSE_POSITIVE))
-      .isEqualTo(IssueStatus.FALSE_POSITIVE);
-
-    assertThat(IssueStatus.of(Issue.STATUS_RESOLVED, Issue.RESOLUTION_WONT_FIX))
-      .isEqualTo(IssueStatus.ACCEPTED);
-
-    assertThat(IssueStatus.of(Issue.STATUS_REOPENED, null))
-      .isEqualTo(IssueStatus.OPEN);
-
-    assertThat(IssueStatus.of(Issue.STATUS_CLOSED, null))
-      .isEqualTo(IssueStatus.FIXED);
-  }
-
-  @Test
-  public void of_shouldReturnNull_whenStatusBelongsToHotspot() {
-    assertThat(IssueStatus.of(Issue.STATUS_TO_REVIEW, null))
-      .isNull();
-
-    assertThat(IssueStatus.of(Issue.STATUS_REVIEWED, Issue.RESOLUTION_SAFE))
-      .isNull();
-
-    assertThat(IssueStatus.of(Issue.STATUS_REVIEWED, Issue.RESOLUTION_ACKNOWLEDGED))
-      .isNull();
-  }
-
-  @Test
-  public void of_shouldLogWarning_whenUnknownMapping() {
-    assertThat(IssueStatus.of(Issue.STATUS_RESOLVED, null)).isNull();
-    assertThat(logTester.getLogs()).extracting(LogAndArguments::getFormattedMsg).contains("Can't find mapped issue status for status 'RESOLVED' and resolution 'null'");
-
-    assertThat(IssueStatus.of(Issue.STATUS_RESOLVED, Issue.RESOLUTION_SAFE)).isNull();
-    assertThat(logTester.getLogs()).extracting(LogAndArguments::getFormattedMsg).contains("Can't find mapped issue status for status 'RESOLVED' and resolution 'SAFE'");
-  }
-
-  @Test
-  public void of_shouldLogWarning_whenStatusIsNull() {
-    assertThat(IssueStatus.of(null, null)).isEqualTo(IssueStatus.OPEN);
-    assertThat(logTester.getLogs()).extracting(LogAndArguments::getFormattedMsg).contains("Missing status, falling back to OPEN");
-  }
-
-}