| | |
| | | project.project_key as projectKey, |
| | | issue_type.id as issueTypeId, |
| | | issue_type.name as issueTypeName, |
| | | issue_type.inherit_partners as inheritPartners, |
| | | issue_status.id as issueStatusId, |
| | | issue_status.issue_status_type as issueStatusType, |
| | | issue_status.name as issueStatusName, |
| | |
| | | ic.name AS companyName, |
| | | ii.name AS ispName, |
| | | ih.name AS hostingName, |
| | | d.department_name AS departmentName, |
| | | GROUP_CONCAT(issue_custom.use_value) AS useValue, |
| | | IFNULL(temp_attached_file.attachedFileCount, 0) as attachedFileCount, |
| | | IFNULL(temp_issue_comment.issueCommentCount, 0) as issueCommentCount |
| | |
| | | ANd issue.complete_date <![CDATA[ <= ]]> #{endCompleteDate} |
| | | </if> |
| | | |
| | | <if test="beginDateRange != null and !beginDateRange.equals('') and endDateRange != null and !endDateRange.equals('')"> |
| | | AND (issue.start_date BETWEEN #{beginDateRange} AND #{endDateRange} OR issue.complete_date BETWEEN #{beginDateRange} AND #{endDateRange}) |
| | | </if> |
| | | |
| | | <if test="combinationIssueNumber == null or combinationIssueNumber.equals('')"> |
| | | <if test="hideDownIssue != null and hideDownIssue == true"> |
| | | <if test="hideDownIssue != null and hideDownIssue == true and parentYN == true"> |
| | | AND issue.parent_issue_id IS NULL |
| | | </if> |
| | | </if> |
| | | |
| | | <if test="hideCompleteIssue != null and hideCompleteIssue == true"> |
| | | AND issue_status.issue_status_type != 'CLOSE' |
| | | </if> |
| | | |
| | | <if test="parentYN != null and parentYN == true and hideDownIssue == true"> |
| | | AND issue.parent_issue_id IS NULL |
| | | </if> |
| | | |
| | | <if test="hideDownIssue == false and parentYN == false"> |
| | | AND issue.parent_issue_id IS NOT NULL |
| | | </if> |
| | | |
| | | <choose> |
| | |
| | | AND issue.reverse_index <![CDATA[ < ]]> 0 |
| | | AND workspace.id = #{workspaceId} |
| | | GROUP BY issue.id |
| | | ORDER BY issue.modify_date DESC |
| | | ORDER BY issue.register_date DESC |
| | | <if test="page != null and !page.equals('')"> |
| | | limit #{pageSize} offset #{page}; |
| | | </if> |
| | |
| | | ANd issue.complete_date <![CDATA[ <= ]]> #{endCompleteDate} |
| | | </if> |
| | | |
| | | <if test="beginDateRange != null and !beginDateRange.equals('') and endDateRange != null and !endDateRange.equals('')"> |
| | | AND (issue.start_date BETWEEN #{beginDateRange} AND #{endDateRange} OR issue.complete_date BETWEEN #{beginDateRange} AND #{endDateRange}) |
| | | </if> |
| | | |
| | | <if test="combinationIssueNumber == null or combinationIssueNumber.equals('')"> |
| | | <if test="hideDownIssue != null and hideDownIssue == true"> |
| | | <if test="hideDownIssue != null and hideDownIssue == true and parentYN == true"> |
| | | AND issue.parent_issue_id IS NULL |
| | | </if> |
| | | </if> |
| | | |
| | | <if test="hideDownIssue == false and parentYN == false"> |
| | | AND issue.parent_issue_id IS NOT NULL |
| | | </if> |
| | | |
| | | <if test="hideCompleteIssue != null and hideCompleteIssue == true"> |
| | |
| | | |
| | | <insert id="insertBatch" keyColumn="id" keyProperty="id" useGeneratedKeys="true"> |
| | | INSERT INTO issue(title, description, issue_number, project_id, issue_type_id, priority_id, severity_id, |
| | | start_date, complete_date, |
| | | start_date, complete_date, parent_issue_id, |
| | | issue_status_id, register_id, modify_id, register_date, modify_date) |
| | | VALUES |
| | | <foreach collection="list" item="issueForm" index="index" separator="," open="" close=""> |
| | | (#{issueForm.title}, #{issueForm.description}, #{issueForm.issueNumber}, #{issueForm.projectId}, |
| | | #{issueForm.issueTypeId}, #{issueForm.priorityId}, #{issueForm.severityId}, #{issueForm.startDate}, |
| | | #{issueForm.completeDate}, |
| | | #{issueForm.completeDate}, #{issueForm.parentIssueId}, |
| | | #{issueForm.issueStatusId}, #{issueForm.registerId}, #{issueForm.registerId}, NOW(), NOW()) |
| | | </foreach> |
| | | </insert> |
| | |
| | | HAVING concatUseValue LIKE CONCAT('%', #{useValue}, '%') |
| | | </select> |
| | | |
| | | <!-- 특정 사용자 정의 필드 IP 값이 업체와 동일한 이슈를 조회 --> |
| | | <select id="findByCustomFieldValueOfIp" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.IssueCustomFieldValueCondition"> |
| | | SELECT |
| | | issue.id as id, |
| | | issue.title as title, |
| | | customFieldValue.customFieldType AS customFieldType, |
| | | GROUP_CONCAT(customFieldValue.useValue ORDER BY customFieldValue.customFieldId ASC) AS concatUseValue |
| | | FROM issue issue FORCE INDEX(reverseIndex) |
| | | INNER JOIN issue_status as issStatus ON issue.issue_status_id = issStatus.id |
| | | LEFT OUTER JOIN ( |
| | | SELECT cf.id AS customFieldId, cf.custom_field_type AS customFieldType, issue_custom.use_value AS useValue, issue_custom.issue_id AS issueId |
| | | FROM issue_custom_field_value issue_custom |
| | | INNER JOIN custom_field cf ON cf.id = issue_custom.custom_field_id |
| | | ) customFieldValue ON customFieldValue.issueId = issue.id |
| | | INNER JOIN issue_company issc ON issc.issue_id = issue.id |
| | | WHERE issue.issue_type_id = #{issueTypeId} |
| | | <if test="customFieldType != '' and customFieldType != null"> |
| | | AND customFieldValue.customFieldType = #{customFieldType} |
| | | </if> |
| | | <if test="useValue != '' and useValue != null"> |
| | | AND INET_ATON(issc.ip_start) <![CDATA[ <= ]]> #{useValue} AND INET_ATON(issc.ip_end) >= #{useValue} |
| | | </if> |
| | | <choose> |
| | | <when test="issueStatusType != null"> |
| | | AND issStatus.issue_status_type != #{issueStatusType} |
| | | </when> |
| | | </choose> |
| | | GROUP BY issue.id |
| | | </select> |
| | | |
| | | |
| | | <!-- 종료 안된 하위 이슈 가져오기 --> |
| | | <select id="findNotCompleteByParentIssueId" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.IssueCondition"> |