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
08e3aa3e
Commit
08e3aa3e
authored
Dec 08, 2023
by
Tấn Trần Thanh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/workflow-report-plugin' into feature/improve-performance-workflow-report
parents
cfcf0b0c
c67f1814
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
plugins/workflow_report/lib/workflow_report.rb
+9
-6
No files found.
plugins/workflow_report/lib/workflow_report.rb
View file @
08e3aa3e
...
...
@@ -23,8 +23,11 @@ module WorkflowReport
# raw_tasks = WorkflowReportIssue.raw_tasks_records(root_ids)
raw_tasks
.
group_by
(
&
:root_id
).
each
do
|
root_id
,
record
|
sum_hours_record
=
sum_hours_records
.
find
{
|
hr
|
hr
.
root_id
==
root_id
}
issue_ids
=
record
.
map
(
&
:id
)
journals
=
WorkflowReportJournal
.
find_journal_by_issue_ids
(
issue_ids
).
to_a
result
[
0
]
<<
root_id
result
[
1
]
<<
record
.
first
.
project
.
name
.
gsub
(
/[^[:print:]]/
,
''
)
subject
=
WorkflowReportIssue
.
find
(
record
.
first
.
root_id
)
&
.
subject
||
record
.
first
[
:subject
]
...
...
@@ -94,7 +97,10 @@ module WorkflowReport
result
[
BUG_COLS
+
index
]
<<
find_max_value_by_custom_field_id
(
record
,
custom_id
)
end
end
if
jp_request
.
present?
if
jp_request
.
strip
.
blank?
result
[
32
]
<<
''
result
[
33
]
<<
''
else
jp_request
=
jp_request
.
strip
result
[
32
]
<<
jp_request
begin
...
...
@@ -107,11 +113,8 @@ module WorkflowReport
end
rescue
StandardError
=>
e
error_links
<<
"#
#{
root_id
}
Error occurred during the build with the ISSUE link:
\r\n
-
#{
jp_request
}
\r\n
-
#{
e
.
message
.
gsub
(
/(?<=access_token=).*/
,
'123'
)
}
"
result
[
33
].
push
(
''
)
result
[
33
].
push
(
''
)
if
result
[
33
][
result
[
0
].
length
-
1
].
nil?
end
else
result
[
32
]
<<
''
result
[
33
]
<<
''
end
# pr detail
pr
=
{
pr_comments:
0
,
pr_review_comments:
0
,
pr_commits:
0
,
pr_changed_files:
0
,
pr_additions:
0
,
pr_deletions:
0
}
...
...
@@ -128,9 +131,9 @@ module WorkflowReport
pr
[
:pr_comments
]
+=
pr_detail
.
comments
pr
[
:pr_review_comments
]
+=
pr_detail
.
review_comments
pr
[
:pr_commits
]
+=
pr_detail
.
commits
pr
[
:pr_changed_files
]
+=
pr_detail
.
changed_files
pr
[
:pr_additions
]
+=
pr_detail
.
additions
pr
[
:pr_deletions
]
+=
pr_detail
.
deletions
pr
[
:pr_changed_files
]
+=
pr_detail
.
changed_files
end
rescue
StandardError
=>
e
error_links
<<
"#
#{
root_id
}
Error occurred during the build with the PR link:
\r\n
-
#{
link
}
\r\n
-
#{
e
.
message
.
gsub
(
/(?<=access_token=).*/
,
'123'
)
}
"
...
...
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