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
9a616fe2
Commit
9a616fe2
authored
Dec 06, 2023
by
Tấn Trần Thanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
break line if notes larger than 1
parent
9939a3e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
plugins/workflow_report/app/views/workflow_report/_table_workflow_report.html.slim
+2
-0
plugins/workflow_report/lib/workflow_report.rb
+3
-3
No files found.
plugins/workflow_report/app/views/workflow_report/_table_workflow_report.html.slim
View file @
9a616fe2
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
-
(
0
..
(
thead
.
length
-
1
)).
each
do
|
i
|
-
(
0
..
(
thead
.
length
-
1
)).
each
do
|
i
|
-
if
i
==
0
-
if
i
==
0
td
.sidebar_visible
=
result
[
0
][
index
]
td
.sidebar_visible
=
result
[
0
][
index
]
-
elsif
i
==
13
td
=
result
[
i
][
index
].
html_safe
-
else
-
else
td
=
result
[
i
][
index
]
td
=
result
[
i
][
index
]
-
else
-
else
...
...
plugins/workflow_report/lib/workflow_report.rb
View file @
9a616fe2
...
@@ -52,7 +52,7 @@ module WorkflowReport
...
@@ -52,7 +52,7 @@ module WorkflowReport
if
journals
.
length
.
positive?
if
journals
.
length
.
positive?
number_of_est_changes
=
journals
.
count
{
|
j
|
!
j
[
1
].
nil?
}
||
''
number_of_est_changes
=
journals
.
count
{
|
j
|
!
j
[
1
].
nil?
}
||
''
est_changes
=
journals
.
reject
{
|
j
|
j
[
1
].
nil?
}.
select
{
|
e
|
e
[
4
].
present?
}
est_changes
=
journals
.
reject
{
|
j
|
j
[
1
].
nil?
}.
select
{
|
e
|
e
[
4
].
present?
}
notes
=
est_changes
.
inject
(
''
)
{
|
all
,
i
|
"
#{
all
}
#{
i
[
4
]
}
\n
"
}
||
''
notes
=
est_changes
.
inject
(
''
)
{
|
all
,
i
|
"
#{
all
}
<p> -
#{
i
[
4
]
}
.</p>
"
}
||
''
original_est_hours
=
journals
.
group_by
(
&
:shift
).
inject
(
0
)
{
|
sum
,
i
|
sum
+
i
[
1
][
0
][
1
].
to_f
unless
i
.
nil?
}
||
''
original_est_hours
=
journals
.
group_by
(
&
:shift
).
inject
(
0
)
{
|
sum
,
i
|
sum
+
i
[
1
][
0
][
1
].
to_f
unless
i
.
nil?
}
||
''
result
[
11
]
<<
original_est_hours
result
[
11
]
<<
original_est_hours
result
[
12
]
<<
number_of_est_changes
result
[
12
]
<<
number_of_est_changes
...
@@ -98,7 +98,7 @@ module WorkflowReport
...
@@ -98,7 +98,7 @@ module WorkflowReport
result
[
32
]
<<
jp_request
result
[
32
]
<<
jp_request
begin
begin
jp_request_arr
=
URI
(
jp_request
).
path
.
split
(
'/'
).
reject
(
&
:blank?
)
jp_request_arr
=
URI
(
jp_request
).
path
.
split
(
'/'
).
reject
(
&
:blank?
)
if
jp_request_arr
.
length
=
=
4
&&
jp_request_arr
[
3
].
to_i
.
positive?
if
jp_request_arr
.
length
>
=
4
&&
jp_request_arr
[
3
].
to_i
.
positive?
issue_detail
=
github
.
issues
.
find
user:
jp_request_arr
[
0
],
repo:
jp_request_arr
[
1
],
number:
jp_request_arr
[
3
]
issue_detail
=
github
.
issues
.
find
user:
jp_request_arr
[
0
],
repo:
jp_request_arr
[
1
],
number:
jp_request_arr
[
3
]
result
[
33
].
push
(
issue_detail
.
success?
?
issue_detail
.
comments
:
''
)
result
[
33
].
push
(
issue_detail
.
success?
?
issue_detail
.
comments
:
''
)
...
@@ -119,7 +119,7 @@ module WorkflowReport
...
@@ -119,7 +119,7 @@ module WorkflowReport
prs
.
each
do
|
link
|
prs
.
each
do
|
link
|
begin
begin
pr_link_arr
=
URI
(
link
.
strip
).
path
.
split
(
'/'
).
reject!
(
&
:empty?
)
pr_link_arr
=
URI
(
link
.
strip
).
path
.
split
(
'/'
).
reject!
(
&
:empty?
)
next
unless
pr_link_arr
.
length
=
=
4
next
unless
pr_link_arr
.
length
>
=
4
pr_detail
=
github
.
pull_requests
.
find
user:
pr_link_arr
[
0
],
repo:
pr_link_arr
[
1
],
number:
pr_link_arr
[
3
]
pr_detail
=
github
.
pull_requests
.
find
user:
pr_link_arr
[
0
],
repo:
pr_link_arr
[
1
],
number:
pr_link_arr
[
3
]
if
pr_detail
.
success?
if
pr_detail
.
success?
...
...
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