Index: arms/js/reqStatus.js =================================================================== diff -u -rd84a2bea49785d551e74669af40e88665db71bac -r6d657f78eb01846ecb3d604008cf44fac8f88c40 --- arms/js/reqStatus.js (.../reqStatus.js) (revision d84a2bea49785d551e74669af40e88665db71bac) +++ arms/js/reqStatus.js (.../reqStatus.js) (revision 6d657f78eb01846ecb3d604008cf44fac8f88c40) @@ -396,13 +396,20 @@ function processData(data) { const nodes = {}; - data.forEach(item => { - nodes[item.key] = { ...item, children: [] }; + let reqIssue = data.filter(item => item.isReq && !item.etc); + let linkedIssue = data.filter(item => item.etc).map(item => { + return { ...item, connectType: "linked" }; }); + let subtaskIssue = data.filter(item => !item.isReq && !item.etc); + // 노드 생성 + subtaskIssue.forEach(item => { + nodes[item.key] = { ...item, children: [], connectType: "subtask" }; + }); + // 트리 구성 - data.forEach(item => { - if (!item.isReq && (item.parentReqKey !== item.upperKey)) { + subtaskIssue.forEach(item => { + if (item.parentReqKey !== item.upperKey) { // 상위 항목의 children에 추가 let upperNode = nodes[item.upperKey]; while (upperNode && (upperNode.parentReqKey !== upperNode.upperKey)) { @@ -415,9 +422,15 @@ }); // 노드 필터링 - return Object.values(nodes).filter(item => - item.isReq || (!item.isReq && (item.parentReqKey === item.upperKey)) - ).map(item => nodes[item.key]); + let parentNodes = Object.values(nodes) + .filter(item => item.parentReqKey === item.upperKey) + .map(item => nodes[item.key]); + + return [ + ...reqIssue, + ...linkedIssue, + ...parentNodes + ]; } function format(d) { @@ -431,25 +444,18 @@ title: "요구사항 구분", data: "isReq", render: function (data, type, row, meta) { - let upperKey = row.upperKey; - if (row.connectType === "subtask") { - upperKey += "의 하위 이슈"; - } else { - upperKey += "의 연결 이슈"; - } + let upperKey = row.upperKey + "의 하위 이슈"; if (row.deleted) { - if(row.deleted.deleted_isDeleted === true){ + if (row.deleted.deleted_isDeleted) { upperKey = "" + upperKey + ""; - }else if(row.deleted.deleted_isDeleted === false){ + } else { upperKey = "

" + upperKey + "

"; } } if (row.connectType === "subtask") { return "
" + upperKey + "
"; - } else { - return "
" + upperKey + "
"; } return data; }, @@ -773,9 +779,9 @@ let parentReqKey = row.parentReqKey; if (row.connectType === "subtask") { parentReqKey += "의 하위 이슈"; - } else { - parentReqKey += "의 연결 이슈"; - } + } else if (row.connectType === "linked") { + parentReqKey = row.etc + "의 연결 이슈"; + } let key = row.key; if (row.deleted) { if(row.deleted.deleted_isDeleted === true){ @@ -786,7 +792,7 @@ key = "

" + key + "

"; } } - if (isEmpty(data) || data == false) { + if (isEmpty(data) || data == false || row.etc) { return "
" + parentReqKey + "
"; } else { return "
" + key + "
"; @@ -806,15 +812,12 @@ } else { let displayText = data; let color; - if (!isEmpty(row.isReq) && row.isReq == true) { + if (!isEmpty(row.isReq) && row.isReq == true && !row.etc) { color = "#a4c6ff"; }else{ color = "#f8f8f8"; // 기본 텍스트 색상 } - let btn_data_row1 = { - pdServiceVersions : row.pdServiceVersions.join(","), - cReqLink : row.creqLink - }; + // 삭제 여부 if (row.deleted && row.deleted.deleted_isDeleted === true) { displayText = "" + data + ""; @@ -823,7 +826,11 @@ color = "#808080"; } // 요구사항 이슈 여부 - if (!isEmpty(row.isReq) && row.isReq === true) { + if (!isEmpty(row.isReq) && row.isReq && !row.etc) { + let btn_data_row1 = { + pdServiceVersions : row.pdServiceVersions.join(","), + cReqLink : row.creqLink + }; return ("
" + displayText + $("