From b2f5eab0b630cc29bd51fbacf89770155d1aaecb Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 30 Mar 2021 11:30:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9C=BA=E6=99=AF=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E5=8D=87=E7=BA=A7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dto/definition/request/MsScenario.java | 1 - .../api/dto/definition/request/MsTestElement.java | 1 - .../api/service/HistoricalDataUpgradeService.java | 8 -------- 3 files changed, 10 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java index aa9e8d7a9f..02fc8979bd 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java @@ -89,7 +89,6 @@ public class MsScenario extends MsTestElement { JSONObject element = JSON.parseObject(scenario.getScenarioDefinition()); hashTree = mapper.readValue(element.getString("hashTree"), new TypeReference>() { }); - OldVersionUtil.transferHashTree(hashTree); // εœΊζ™―ε˜ι‡ if (StringUtils.isNotEmpty(element.getString("variables"))) { LinkedList variables = mapper.readValue(element.getString("variables"), diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java index a7563bf58a..03f2ca46a6 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsTestElement.java @@ -163,7 +163,6 @@ public abstract class MsTestElement { element = mapper.readValue(apiDefinition.getRequest(), new TypeReference() { }); hashTree.add(element); - OldVersionUtil.transferHashTree(hashTree); } } catch (Exception ex) { ex.printStackTrace(); diff --git a/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java b/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java index ea15c56062..c3152fef74 100644 --- a/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java +++ b/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java @@ -82,11 +82,6 @@ public class HistoricalDataUpgradeService { scenario.setName(oldScenario.getName()); scenario.setEnableCookieShare(oldScenario.isEnableCookieShare()); scenario.setEnvironmentId(oldScenario.getEnvironmentId()); - if (StringUtils.isNotEmpty(oldScenario.getEnvironmentId())) { - HashMap envMap = new HashMap<>(); - envMap.put(projectId, oldScenario.getEnvironmentId()); - scenario.setEnvironmentMap(envMap); - } scenario.setReferenced("Upgrade"); scenario.setId(oldScenario.getId()); scenario.setResourceId(UUID.randomUUID().toString()); @@ -431,9 +426,6 @@ public class HistoricalDataUpgradeService { num++; scenarioTest.setHashTree(listSteps); if (StringUtils.isNotEmpty(envId)) { - HashMap envMap = new HashMap<>(); - envMap.put(saveHistoricalDataUpgrade.getProjectId(), envId); - scenarioTest.setEnvironmentMap(envMap); scenarioTest.setEnvironmentId(envId); }