更改:未关联工作项需包含外键为0的数据

This commit is contained in:
yystopf 2023-11-24 09:42:25 +08:00
parent 0adff52355
commit 9c4bc3f37c
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class Api::Pm::SprintIssues::ListService < ApplicationService
private
def issue_query_data
issues = @category == "unlink" ? Issue.where(pm_project_id: @pm_project_id, pm_sprint_id: nil) : Issue.where(pm_project_id: @pm_project_id).where.not(pm_sprint_id: nil)
issues = @category == "unlink" ? Issue.where(pm_project_id: @pm_project_id, pm_sprint_id: [nil, 0]) : Issue.where(pm_project_id: @pm_project_id).where.not(pm_sprint_id: [nil, 0])
issues = issues.where(pm_issue_type: @pm_issue_type) if @pm_issue_type.present?