mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
issue按id集合查询,选择关联issue时排除已选id集合
This commit is contained in:
@@ -76,9 +76,6 @@ class Api::V1::Issues::ListService < ApplicationService
|
||||
# milestone_id
|
||||
issues = issues.where(fixed_version_id: milestone_id) if milestone_id.present?
|
||||
|
||||
# ids
|
||||
issues = issues.where(id: params[:ids].to_s.split(",")) if params[:ids].present?
|
||||
|
||||
#pm相关
|
||||
# root_id# -1 查一级目录
|
||||
issues = if root_id.to_i == -1
|
||||
@@ -105,7 +102,13 @@ class Api::V1::Issues::ListService < ApplicationService
|
||||
issues = issues.where(status_id: status_id) if status_id.present? && category != 'closed'
|
||||
|
||||
# status_ids
|
||||
issues = issues.where(status_id: status_ids) unless status_ids.blank?
|
||||
issues = issues.where(status_id: status_ids) unless status_ids.blank?
|
||||
|
||||
# ids
|
||||
issues = issues.where(id: params[:ids].to_s.split(",")) if params[:ids].present?
|
||||
|
||||
# exclude_ids
|
||||
issues = issues.where.not(id: params[:exclude_ids].to_s.split(",")) if params[:exclude_ids].present?
|
||||
|
||||
if begin_date&.present? || end_date&.present?
|
||||
issues = issues.where('issues.created_on between ? and ?', begin_date&.present? ? begin_date.to_time : Time.now.beginning_of_day, end_date&.present? ? end_date.to_time.end_of_day : Time.now.end_of_day)
|
||||
|
||||
Reference in New Issue
Block a user