Index: arms/js/reqStatus.js
===================================================================
diff -u -r79642918dc0545c54bc47810800a28e5706243a8 -r56f6d6a18b06d17a87ed46d8bb8e6c579d0048f4
--- arms/js/reqStatus.js (.../reqStatus.js) (revision 79642918dc0545c54bc47810800a28e5706243a8)
+++ arms/js/reqStatus.js (.../reqStatus.js) (revision 56f6d6a18b06d17a87ed46d8bb8e6c579d0048f4)
@@ -387,6 +387,7 @@
let data = apiResponse.body;
let tableData = processData(data);
+ console.log(tableData);
dataTableLoad(tableData);
}
}
@@ -1356,456 +1357,20 @@
reqStatusDataTable.button(".buttons-pdf").trigger();
});
-
-function getLinkedIssueAndSubtask(notUse, endPointUrl) {
- var columnList = [
- {
- name: "issueID",
- title: "이슈아이디",
- data: "issueID",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "
N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: false
- },
- {
- name: "key",
- title: "ALM Issue Key",
- data: "key",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "parentReqKey",
- title: "부모이슈 키",
- data: "parentReqKey",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: false
- },
- {
- name: "summary",
- title: "ALM Issue Title ",
- data: "summary",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "issuetype.issuetype_name",
- title: "ALM Issue Type",
- data: "issuetype.issuetype_name",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "false") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "priority",
- title: "이슈 우선순위",
- data: "priority.priority_name",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "status.status_name",
- title: "이슈 상태",
- data: "status.status_name",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "reporter",
- title: "이슈 보고자",
- data: "reporter.reporter_displayName",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "assignee",
- title: "이슈 할당자",
- data: "assignee.assignee_displayName",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "created",
- title: "이슈 생성일자",
- data: "created",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + dateFormat(data) + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "updated",
- title: "이슈 최근 업데이트 일자",
- data: "updated",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + dateFormat(data) + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- }
- ];
-
- var rowsGroupList = [];
- var columnDefList = [
- {
- orderable: false,
- className: "select-checkbox",
- targets: 0
- }
- ];
- var orderList = [[1, "asc"]];
- var jquerySelector = "#linkedIssueAndSubtaskTable";
- var ajaxUrl = "/auth-user/api/arms/reqStatus" + endPointUrl;
- var jsonRoot = "";
- var buttonList = [];
- var selectList = {};
- var isServerSide = false;
-
- reqStatusDataTable = dataTable_build(
- jquerySelector,
- ajaxUrl,
- jsonRoot,
- columnList,
- rowsGroupList,
- columnDefList,
- selectList,
- orderList,
- buttonList,
- isServerSide
- );
-}
-
function reqIssueAndItsSubtasksEvent() {
- let $modalBtn;
let $modalBtn_alongWith;
- $("#subtask_linkedissue_modal").on("shown.bs.modal", function(event) {
- $modalBtn = $(event.relatedTarget);
- var selectedRow = $modalBtn.data("row");
- var endPointUrl = "/T_ARMS_REQSTATUS_" + selectedPdServiceId
- + "/getIssueAndItsSubtasks.do?"
- + "pdServiceVersions=" + selectedRow.pdServiceVersions
- + "&jiraServerId=" + selectedRow.jiraServerId
- + "&issueKey=" + selectedRow.issueKey;
- getReqIssueAndItsSubtasks(endPointUrl); // 데이터테이블 그리기
- });
-
$("#reqIssue_alongWith_modal").on("shown.bs.modal", function(event) {
$modalBtn_alongWith = $(event.relatedTarget);
- var selectedRow2 = $modalBtn_alongWith.data("row");
- var endPointUrl_2 = "/T_ARMS_REQSTATUS_" + selectedPdServiceId
+ var selectedRow = $modalBtn_alongWith.data("row");
+ var endPointUrl = "/T_ARMS_REQSTATUS_" + selectedPdServiceId
+ "/reqIssues-created-together.do?"
- + "pdServiceVersions=" + selectedRow2.pdServiceVersions
- + "&cReqLink=" + selectedRow2.cReqLink;
- getReqIssuesCreatedTogether(endPointUrl_2);
+ + "pdServiceVersions=" + selectedRow.pdServiceVersions
+ + "&cReqLink=" + selectedRow.cReqLink;
+ getReqIssuesCreatedTogether(endPointUrl);
});
}
-function getReqIssueAndItsSubtasks(endPointUrl) {
-
- var columnList = [
- {
- name: "isReq",
- title: "요구사항 구분",
- data: "isReq",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data == false) {
- return " 연결 이슈
";
- } else {
- return " 요구사항 이슈
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "issueID",
- title: "이슈아이디",
- data: "issueID",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: false
- },
- {
- name: "key",
- title: "ALM Issue Key",
- data: "key",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- let serverType = getServerType(row.jira_server_id);
- let alm_link = makeALMIssueLink(serverType, row.self, data);
-
- return ("" + data +
- $("")
- .append($(''))
- .attr("onclick", alm_link ? `window.open('${alm_link}', '_blank')` : "#")
- .prop("outerHTML") +
- "
");
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "parentReqKey",
- title: "부모이슈 키",
- data: "parentReqKey",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: false
- },
- {
- name: "summary",
- title: "ALM Issue Title ",
- data: "summary",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "issuetype.issuetype_name",
- title: "Issue Type",
- data: "issuetype.issuetype_name",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "false") {
- return "N/A
";
- } else {
- if( isEmpty(row.isReq) || row.isReq == false){
- return "" + data + "
";
- }
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "priority",
- title: "Issue Priority",
- data: "priority.priority_name",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "status.status_name",
- title: "Issue Status",
- data: "status.status_name",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "reporter.reporter_displayName",
- title: "Issue Reporter",
- data: "reporter.reporter_displayName",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "assignee.assignee_displayName",
- title: "Issue Assignee",
- data: function (row, type, set, meta) {
- return row.assignee ? row.assignee.assignee_displayName : null;
- },
- render: function (data, type, row, meta) {
- //if (isEmpty(data) || data === "unknown") {
- if ([null, undefined, ""].includes(data)) {
- return "N/A
";
- } else {
- return "" + data + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "created",
- title: "ALM Created",
- data: "created",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + dateFormat(data) + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- },
- {
- name: "updated",
- title: "ALM Updated",
- data: "updated",
- render: function (data, type, row, meta) {
- if (isEmpty(data) || data === "unknown") {
- return "N/A
";
- } else {
- return "" + dateFormat(data) + "
";
- }
- return data;
- },
- className: "dt-body-left",
- visible: true
- }
- ];
-
- var rowsGroupList = [];
- var columnDefList = [];
- var orderList = [[1, "asc"]];
- var jquerySelector = "#reqIssueAndItsSubtasksTable";
- var ajaxUrl = "/auth-user/api/arms/reqStatus" + endPointUrl;
- var jsonRoot = "response";
- var buttonList = [];
- var selectList = {};
- var isServerSide = false;
- var errorMode = false;
-
- reqIssueAndItsSubtasksTable = dataTable_build(
- jquerySelector,
- ajaxUrl,
- jsonRoot,
- columnList,
- rowsGroupList,
- columnDefList,
- selectList,
- orderList,
- buttonList,
- isServerSide,
- errorMode
- );
-}
function getReqIssuesCreatedTogether(endPointUrl) {
var columnList = [
{