From 56ae1cd12a7a3a92563bcbf5583f659c5ad5eee5 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 목, 27 1월 2022 15:42:59 +0900
Subject: [PATCH] - 상위 이슈 검색시 하위 이슈는 검색 제외 및 프로젝트 설정 해야 상위이슈 선택 가능하도록 수정

---
 src/main/resources/mybatis/query-template/project-template.xml |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mybatis/query-template/project-template.xml b/src/main/resources/mybatis/query-template/project-template.xml
index cd7a94e..35136a4 100644
--- a/src/main/resources/mybatis/query-template/project-template.xml
+++ b/src/main/resources/mybatis/query-template/project-template.xml
@@ -53,7 +53,7 @@
             </when>
         </choose>
         AND ws.id = #{workspaceId}
-        ORDER BY p.id desc
+        ORDER BY p.register_date desc
         <if test="page != null and !page.equals('')">
             limit #{pageSize} offset #{page};
         </if>
@@ -120,7 +120,7 @@
             </when>
         </choose>
         AND ws.id = #{workspaceId}
-        ORDER BY p.id desc
+        ORDER BY p.register_date desc
         <if test="page != null and !page.equals('')">
             limit #{pageSize} offset #{page};
         </if>
@@ -264,7 +264,7 @@
         </choose>
         AND p.workspace_id = #{workspaceId}
         <if test="page != null and !page.equals('')">
-            ORDER BY p.id desc
+            ORDER BY p.register_date desc
             limit #{pageSize} offset #{page};
         </if>
     </select>
@@ -639,6 +639,21 @@
         WHERE pc.parent_project_id = #{parent_project_id}
     </select>
 
+    <select id="findByIssueType" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.ProjectCondition">
+        SELECT
+            p.id as id,
+            p.name as name,
+            p.description as description,
+            p.status as status,
+            p.start_date as startDate,
+            p.end_date as endDate,
+            p.project_key as projectKey
+        FROM
+            project p
+                INNER JOIN issue_type it ON it.project_id = p.id
+        WHERE it.id = #{issueTypeId}
+    </select>
+
     <!--    �봽濡쒖젥�듃 �궘�젣 -->
     <!--<delete id="deleteProject" parameterType="java.util.HashMap">
         &lt;!&ndash;    �봽濡쒖젥�듃�뿉 �뿰寃곕맂 �궗�슜�옄 �젙�쓽 �븘�뱶 �젙蹂� �궘�젣   &ndash;&gt;

--
Gitblit v1.8.0