mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:45:57 +08:00
新增:导出工作项关联工作项记录
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
|
||||
class PmLink < ApplicationRecord
|
||||
belongs_to :linkable, polymorphic: true
|
||||
belongs_to :be_linkable, polymorphic: true
|
||||
belongs_to :linkable_issue, -> {where(pm_links: {linkable_type: 'Issue'})}, foreign_key: 'linkable_id', class_name: 'Issue'
|
||||
belongs_to :be_linkable_issue, -> {where(pm_links: {be_linkable_type: 'Issue'})}, foreign_key: 'be_linkable_id', class_name: 'Issue'
|
||||
|
||||
def be_linkable
|
||||
be_linkable_type.constantize.find be_linkable_id
|
||||
|
||||
Reference in New Issue
Block a user