Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Redmine
All Projects
Redmine
Overview
Download
Activity
Roadmap
Issues
News
Wiki
Plugins
Forums
Repository
Download (679 Bytes)
Patch #40538
ยป version_extension.rb
Enzo Pellecchia
, 2024-04-08 16:16
# app/models/version_extension.rb
module
VersionExtension
def
self
.
included
(
base
)
base
.
class_eval
do
def
visible_fixed_issues
@visible_fixed_issues
||=
begin
issues
=
fixed_issues
.
visible
# Aggiungi gli issue figlio degli altri progetti
issue_ids
=
issues
.
pluck
(
:id
)
child_issues
=
Issue
.
where
(
parent_id:
issue_ids
).
where
.
not
(
project_id:
project_id
)
all_issues
=
issues
+
child_issues
all_issues
end
end
end
end
end
# Includi il modulo nel modello Version
Version
.
include
(
VersionExtension
)
(1-1/1)
Loading...