|
@@ -206,7 +206,9 @@ public class BlockChainAspect {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public boolean uploadTestReportInfoToBlockChain(String report_id){
|
|
|
+ public boolean uploadTestReportInfoToBlockChain(String bug_id){
|
|
|
+ Bug bug=bugDao.findByid(bug_id);
|
|
|
+ String report_id=bug.getReport_id();
|
|
|
String defaultString="defaultString";
|
|
|
Report report=reportDao.findById(report_id);
|
|
|
if(report!=null) {
|
|
@@ -237,12 +239,10 @@ public class BlockChainAspect {
|
|
|
}
|
|
|
List<Bug> bugList = bugDao.findByReport(report.getId(), report.getCase_take_id());
|
|
|
JSONArray bugReportList = new JSONArray();
|
|
|
- for (Bug bug : bugList) {
|
|
|
- JSONObject bugInfo = new JSONObject();
|
|
|
- bugInfo.put("bugId", bug.getId());
|
|
|
- bugInfo.put("bugName", bug.getTitle());
|
|
|
- bugReportList.put(bugInfo);
|
|
|
- }
|
|
|
+ JSONObject bugInfo = new JSONObject();
|
|
|
+ bugInfo.put("bugId", bug.getId());
|
|
|
+ bugInfo.put("bugName", bug.getTitle());
|
|
|
+ bugReportList.put(bugInfo);
|
|
|
testReportVO.put("bugReportList", bugReportList);
|
|
|
String url = blockChainHost + "testReport";
|
|
|
try {
|