Skip to content

Commit

Permalink
Bugfix: Handle deprecated fields to adapt to history versions of Grad…
Browse files Browse the repository at this point in the history
…le & Azure plugin
  • Loading branch information
zhou9584 committed Jan 22, 2024
1 parent a923cae commit 021cb8d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ public Task getTaskDetail(String id) {
deviceTestResult.setAttachments(attachmentService.getAttachments(deviceTestResult.getId(), EntityType.TEST_RESULT));
deviceTestResult.setTaskResult(taskResultRepository.findByTaskRunId(deviceTestResult.getId()).orElse(null));
}

// for deprecated field
task.getDeviceTestResults().addAll(byTestTaskId);
task.setTestDevicesCount(task.getDeviceCount());
task.setTestErrorMsg(task.getErrorMsg());
return task;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ public class Task implements Serializable {
@Transient
private boolean disableRecording = false;

@Transient
@Deprecated
private List<TestRun> deviceTestResults = new ArrayList<>();

@Transient
@Deprecated
private int testDevicesCount;

@Transient
@Deprecated
private String testErrorMsg;

public synchronized void addTestedDeviceResult(TestRun deviceTestResult) {
taskRunList.add(deviceTestResult);
}
Expand Down

0 comments on commit 021cb8d

Please sign in to comment.