Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
redmine_v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
redmine_v2
Commits
9f5054ce
Commit
9f5054ce
authored
Nov 10, 2023
by
Tấn Trần Thanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code
parent
6786d5a8
Pipeline
#1578
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
plugins/workflow_report/app/models/workflow_report_issue.rb
+0
-6
plugins/workflow_report/app/models/workflow_report_journal.rb
+8
-0
plugins/workflow_report/lib/workflow_report.rb
+1
-1
No files found.
plugins/workflow_report/app/models/workflow_report_issue.rb
View file @
9f5054ce
...
@@ -38,10 +38,4 @@ class WorkflowReportIssue < Issue
...
@@ -38,10 +38,4 @@ class WorkflowReportIssue < Issue
.
where
.
not
(
issues:
{
tracker_id:
1
})
.
where
.
not
(
issues:
{
tracker_id:
1
})
.
order
(
:root_id
)
.
order
(
:root_id
)
}
}
scope
:find_journal
,
->
(
issue_ids
)
{
Journal
.
joins
(
:details
)
.
where
(
journals:
{
journalized_id:
issue_ids
},
journal_details:
{
prop_key:
'estimated_hours'
})
.
order
(
:journalized_id
,
:id
)
.
pluck
(
:journalized_id
,
:old_value
,
:value
,
:created_on
,
:notes
)
}
end
end
plugins/workflow_report/app/models/workflow_report_journal.rb
0 → 100644
View file @
9f5054ce
class
WorkflowReportJournal
<
Journal
scope
:find_journal_by_issue_ids
,
->
(
issue_ids
)
{
joins
(
:details
)
.
where
(
journals:
{
journalized_id:
issue_ids
},
journal_details:
{
prop_key:
'estimated_hours'
})
.
order
(
:journalized_id
,
:id
)
.
pluck
(
:journalized_id
,
:old_value
,
:value
,
:created_on
,
:notes
)
}
end
plugins/workflow_report/lib/workflow_report.rb
View file @
9f5054ce
...
@@ -20,7 +20,7 @@ module WorkflowReport
...
@@ -20,7 +20,7 @@ module WorkflowReport
sum_hours_record
=
sum_hours_records
.
find
{
|
hr
|
hr
.
root_id
==
root_id
}
sum_hours_record
=
sum_hours_records
.
find
{
|
hr
|
hr
.
root_id
==
root_id
}
issue_ids
=
record
.
map
(
&
:id
)
issue_ids
=
record
.
map
(
&
:id
)
journals
=
WorkflowReport
Issue
.
find_journal
(
issue_ids
).
to_a
journals
=
WorkflowReport
Journal
.
find_journal_by_issue_ids
(
issue_ids
).
to_a
result
[
0
]
<<
root_id
result
[
0
]
<<
root_id
result
[
1
]
<<
record
.
first
[
:project
].
gsub
(
/[^[:print:]]/
,
''
)
result
[
1
]
<<
record
.
first
[
:project
].
gsub
(
/[^[:print:]]/
,
''
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment