fix(测试跟踪): 查询禅道需求时包含子需求
--bug=1017861 --user=李玉号 【测试跟踪】github#18384,测试跟踪,功能用例详情页,关联需求,需求列表页展示的需求没有包含子需求,只有父需求 https://www.tapd.cn/55049933/s/1295025
This commit is contained in:
parent
754df8c88d
commit
fefc70734c
|
@ -133,6 +133,30 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
list.add(demandDTO);
|
||||
}
|
||||
}
|
||||
// {"5": {"children": {"51": {}}}, "6": {}}
|
||||
else if (data.startsWith("{\"")) {
|
||||
Map<String, Map<String, String>> dataMap = JSON.parseMap(data);
|
||||
Collection<Map<String, String>> values = dataMap.values();
|
||||
values.forEach(v -> {
|
||||
Map jsonObject = JSON.parseMap(JSON.toJSONString(v));
|
||||
DemandDTO demandDTO = new DemandDTO();
|
||||
demandDTO.setId(jsonObject.get("id").toString());
|
||||
demandDTO.setName(jsonObject.get("title").toString());
|
||||
demandDTO.setPlatform(key);
|
||||
list.add(demandDTO);
|
||||
if (jsonObject.get("children") != null) {
|
||||
LinkedHashMap<String, Map<String, String>> children = (LinkedHashMap<String, Map<String, String>>) jsonObject.get("children");
|
||||
Collection<Map<String, String>> childrenMap = children.values();
|
||||
childrenMap.forEach(ch -> {
|
||||
DemandDTO dto = new DemandDTO();
|
||||
dto.setId(ch.get("id"));
|
||||
dto.setName(ch.get("title"));
|
||||
dto.setPlatform(key);
|
||||
list.add(dto);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 处理格式 {{"id": {obj}},{"id",{obj}}}
|
||||
else if (data.charAt(0) == '{') {
|
||||
Map dataObject = (Map) obj.get("data");
|
||||
|
|
Loading…
Reference in New Issue