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
2bf5de4f
Commit
2bf5de4f
authored
Dec 18, 2023
by
Tấn Trần Thanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
done ui
parent
baaa838d
Pipeline
#1612
canceled with stages
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
29 deletions
+105
-29
plugins/workflow_report/app/views/workflow_report/_table_workflow_report.html.slim
+20
-11
plugins/workflow_report/assets/javascripts/application.js
+7
-0
plugins/workflow_report/assets/stylesheets/style.css
+73
-14
plugins/workflow_report/lib/workflow_report.rb
+5
-4
No files found.
plugins/workflow_report/app/views/workflow_report/_table_workflow_report.html.slim
View file @
2bf5de4f
h2
=
"Total:
#{
result
[
0
]
&
.
length
}
"
-
if
result
.
present?
-
if
result
.
present?
table
[
border
=
"1"
]
table
[
border
=
"1"
]
tr
.header_table--visible
tr
.header_table--visible
...
@@ -9,27 +10,35 @@
...
@@ -9,27 +10,35 @@
th
.pink
[
colspan
=
"8"
]
Github
th
.pink
[
colspan
=
"8"
]
Github
tr
.header_table--visible.none_colspan
tr
.header_table--visible.none_colspan
-
thead
.
each_with_index
do
|
head
,
index
|
-
thead
.
each_with_index
do
|
head
,
index
|
-
if
(
0
..
7
).
include?
(
index
)
-
case
index
-
when
0
..
2
th
[
class
=
"root_col_#{index} green"
]
=
head
-
when
(
3
..
7
)
th
.green
=
head
th
.green
=
head
-
elsif
(
8
..
10
).
include?
(
index
)
-
when
(
8
..
10
)
th
.red
=
head
th
.red
=
head
-
elsif
(
11
..
13
).
include?
(
index
)
-
when
(
11
..
13
)
th
.blue
=
head
th
.blue
=
head
-
elsif
(
14
..
20
).
include?
(
index
)
-
when
(
14
..
20
)
th
.purple
=
head
th
.purple
=
head
-
elsif
(
21
..
27
).
include?
(
index
)
-
when
(
21
..
27
)
th
.gray
=
head
th
.gray
=
head
-
elsif
(
28
..
31
).
include?
(
index
)
-
when
(
28
..
31
)
th
.yellow
=
head
th
.yellow
=
head
-
else
-
else
th
.pink
=
head
th
.pink
=
head
-
result
[
0
].
each_with_index
do
|
_root_id
,
index
|
-
result
[
0
].
each_with_index
do
|
root_id
,
index
|
tr
tr
-
(
0
..
(
thead
.
length
-
1
)).
each
do
|
i
|
-
(
0
..
(
thead
.
length
-
1
)).
each
do
|
i
|
-
if
i
==
0
-
case
i
td
.sidebar_visible
=
result
[
0
][
index
]
-
when
0
..
2
-
elsif
i
==
13
td
[
class
=
"root_col_#{i}"
]
td
.break-line
=
result
[
i
][
index
]
p
=
result
[
i
][
index
]
-
when
13
td
.notes
-
notes
=
result
[
i
][
index
]
p
.break-line.note_est
[
class
=
"note__est-#{root_id} #{notes.length.zero? ? 'none-over' : 'over_text'}"
]
=
notes
-
else
-
else
td
=
result
[
i
][
index
]
td
=
result
[
i
][
index
]
-
else
-
else
...
...
plugins/workflow_report/assets/javascripts/application.js
View file @
2bf5de4f
...
@@ -77,3 +77,10 @@ window.addEventListener('load', function () {
...
@@ -77,3 +77,10 @@ window.addEventListener('load', function () {
download
(
csvContent
)
download
(
csvContent
)
}
}
})
})
$
(
document
).
on
(
'click'
,
'td.notes'
,
function
()
{
if
(
!
$
(
this
).
find
(
'p.note_est'
).
hasClass
(
'none-over'
))
{
$
(
this
).
find
(
'p.note_est'
).
toggleClass
(
'over_text'
)
$
(
this
).
find
(
'p.note_est'
).
toggleClass
(
'w-100'
)
}
})
plugins/workflow_report/assets/stylesheets/style.css
View file @
2bf5de4f
...
@@ -11,34 +11,24 @@
...
@@ -11,34 +11,24 @@
table
{
table
{
display
:
inline-block
;
display
:
inline-block
;
table-layout
:
fixed
;
table-layout
:
fixed
;
border-collapse
:
collaps
e
;
border-collapse
:
separat
e
;
}
}
.header_table--visible
{
.header_table--visible
{
position
:
sticky
;
position
:
sticky
;
top
:
-1px
;
top
:
0
;
z-index
:
2
;
z-index
:
2
;
height
:
30px
;
}
}
.none_colspan
{
.none_colspan
{
top
:
29px
;
top
:
32px
;
}
.sidebar_visible
{
position
:
sticky
;
background
:
#dacbcb
;
left
:
0
;
z-index
:
1
;
}
}
.mt-10
{
.mt-10
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.green
{
background-color
:
#92ce92
;
}
.red
{
.red
{
background-color
:
#e38585
;
background-color
:
#e38585
;
}
}
...
@@ -88,3 +78,72 @@ p.error_link {
...
@@ -88,3 +78,72 @@ p.error_link {
.break-line
{
.break-line
{
white-space
:
break-spaces
;
white-space
:
break-spaces
;
}
}
.root_col_0
{
position
:
sticky
;
left
:
0
;
z-index
:
1
;
padding
:
5px
0
;
background
:
#dacbcb
;
}
.root_col_0
>
p
{
width
:
78px
;
text-align
:
center
;
}
.root_col_1
{
position
:
sticky
;
left
:
80px
;
z-index
:
1
;
padding
:
5px
0
;
background
:
#dacbcb
;
}
.root_col_1
>
p
{
width
:
120px
;
text-align
:
center
;
}
.root_col_2
{
position
:
sticky
;
left
:
202px
;
z-index
:
1
;
padding
:
5px
8px
;
background
:
#dacbcb
;
}
.green
{
background
:
#92ce92
;
}
td
.notes
{
position
:
relative
;
}
.note_est
{
width
:
140px
;
}
.over_text
{
overflow
:
hidden
;
display
:
block
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
1
;
}
.over_text
::before
{
position
:
absolute
;
right
:
6px
;
top
:
8px
;
content
:
''
;
display
:
inline-block
;
border
:
5px
solid
transparent
;
border-top-color
:
black
;
vertical-align
:
middle
;
}
.w-100
{
width
:
100%
;
}
plugins/workflow_report/lib/workflow_report.rb
View file @
2bf5de4f
...
@@ -23,8 +23,9 @@ module WorkflowReport
...
@@ -23,8 +23,9 @@ module WorkflowReport
return
{
workflow_report:
[],
error_links:
[]
}
if
raw_tasks
.
empty?
return
{
workflow_report:
[],
error_links:
[]
}
if
raw_tasks
.
empty?
raw_tasks
.
group_by
(
&
:root_id
).
each
do
|
root_id
,
issues
|
raw_tasks
.
group_by
(
&
:root_id
).
each
do
|
root_id
,
issues
|
issue_ids
=
issues
.
map
(
&
:id
)
arr_issue
=
WorkflowReportIssue
.
where
(
root_id:
root_id
)
root_issue
=
WorkflowReportIssue
.
find
(
root_id
)
issue_ids
=
arr_issue
.
map
(
&
:id
)
root_issue
=
arr_issue
.
find
(
root_id
)
journals
=
WorkflowReportJournal
.
find_journal_by_issue_ids
(
issue_ids
).
to_a
journals
=
WorkflowReportJournal
.
find_journal_by_issue_ids
(
issue_ids
).
to_a
result
[
0
]
<<
root_id
result
[
0
]
<<
root_id
...
@@ -40,7 +41,7 @@ module WorkflowReport
...
@@ -40,7 +41,7 @@ module WorkflowReport
issue_due_date
=
issue_due_dates
.
max_by
{
|
due_date
|
due_date
}
issue_due_date
=
issue_due_dates
.
max_by
{
|
due_date
|
due_date
}
result
[
6
].
push
(
issue_due_date
.
present?
?
issue_due_date
&
.
strftime
(
'%Y-%m-%d %H:%M:%S'
)
:
''
)
result
[
6
].
push
(
issue_due_date
.
present?
?
issue_due_date
&
.
strftime
(
'%Y-%m-%d %H:%M:%S'
)
:
''
)
result
[
7
].
push
(
root_issue
.
status
&
.
name
.
present?
?
root_issue
.
status
&
.
name
:
''
)
result
[
7
].
push
(
root_issue
.
status
&
.
name
.
present?
?
root_issue
.
status
&
.
name
:
''
)
sum_estimated_hours
=
issues
.
map
(
&
:estimated_hours
).
compact
.
sum
sum_estimated_hours
=
arr_issue
.
map
(
&
:estimated_hours
).
compact
.
sum
result
[
8
]
<<
sum_estimated_hours
.
round
(
2
)
result
[
8
]
<<
sum_estimated_hours
.
round
(
2
)
actual_time
=
TimeEntry
.
where
(
issue_id:
issue_ids
).
sum
(
:hours
)
actual_time
=
TimeEntry
.
where
(
issue_id:
issue_ids
).
sum
(
:hours
)
if
actual_time
.
present?
if
actual_time
.
present?
...
@@ -61,7 +62,7 @@ module WorkflowReport
...
@@ -61,7 +62,7 @@ module WorkflowReport
else
else
(
11
..
13
).
each
{
|
i
|
result
[
i
]
<<
''
}
(
11
..
13
).
each
{
|
i
|
result
[
i
]
<<
''
}
end
end
issues
.
each
do
|
issue
|
arr_issue
.
each
do
|
issue
|
if
issue
.
tracker_id
==
USER_STORY_TRACKER_ID
if
issue
.
tracker_id
==
USER_STORY_TRACKER_ID
pr_links
=
issue
.
custom_values
.
find_by
(
custom_field_id:
PR_FIELD_ID
)
&
.
value
pr_links
=
issue
.
custom_values
.
find_by
(
custom_field_id:
PR_FIELD_ID
)
&
.
value
jp_request
=
issue
.
custom_values
.
find_by
(
custom_field_id:
JP_REQUEST_FIELD_ID
)
&
.
value
jp_request
=
issue
.
custom_values
.
find_by
(
custom_field_id:
JP_REQUEST_FIELD_ID
)
&
.
value
...
...
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