pm issue link_index add pm_issues_type

This commit is contained in:
呱呱呱 2023-11-08 09:17:13 +08:00
parent ec43b9e97d
commit 452890f825
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ class Api::Pm::IssuesController < Api::Pm::BaseController
end
def link_index
object_issues = Issue.includes(:pm_links).where( pm_project_id: params[:pm_project_id], root_id: nil ).where.not(pm_links: { linkable_id: params[:id] } )
pm_issues_type= params[:pm_issues_type] || 1
object_issues = Issue.includes(:pm_links).where( pm_project_id: params[:pm_project_id], root_id: nil, pm_issues_type: pm_issues_type).where.not(pm_links: { linkable_id: params[:id] } )
@issues = kaminari_paginate(object_issues)
render 'api/v1/issues/index'
end