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
a3f94b3f
Commit
a3f94b3f
authored
Dec 26, 2023
by
Tấn Trần Thanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config for dynamic setting team and project ids in server
parent
e4ef2e78
Pipeline
#1623
canceled with stages
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
52 deletions
+50
-52
plugins/workflow_report/app/controllers/workflow_report_controller.rb
+4
-4
plugins/workflow_report/config/application.yml.example
+44
-0
plugins/workflow_report/config/settings.yml
+0
-44
plugins/workflow_report/init.rb
+2
-4
No files found.
plugins/workflow_report/app/controllers/workflow_report_controller.rb
View file @
a3f94b3f
...
...
@@ -4,7 +4,7 @@ class WorkflowReportController < ApplicationController
before_action
:require_xhr_request
,
only:
%i[export show_daily_report export_time_entry]
def
index
@team_options
=
$
workflow
_report_config
[
'teams'
].
map
{
|
team
|
team
.
keys
()
}
@team_options
=
$
app
_report_config
[
'teams'
].
map
{
|
team
|
team
.
keys
()
}
end
def
index_daily_report
...
...
@@ -56,7 +56,7 @@ class WorkflowReportController < ApplicationController
end
def
index_time_entry
@team_options
=
$
workflow
_report_config
[
'teams'
].
map
{
|
team
|
team
.
keys
()
}
@team_options
=
$
app
_report_config
[
'teams'
].
map
{
|
team
|
team
.
keys
()
}
end
def
export_time_entry
...
...
@@ -77,9 +77,9 @@ class WorkflowReportController < ApplicationController
def
find_project_ids
(
team
)
if
team
==
'All-team'
$
workflow
_report_config
[
'teams'
].
map
(
&
:values
).
flatten
.
compact
$
app
_report_config
[
'teams'
].
map
(
&
:values
).
flatten
.
compact
else
$
workflow
_report_config
[
'teams'
].
find
{
|
hash
|
hash
.
key?
(
team
)
}[
team
]
$
app
_report_config
[
'teams'
].
find
{
|
hash
|
hash
.
key?
(
team
)
}[
team
]
end
end
end
plugins/workflow_report/config/application.yml.example
View file @
a3f94b3f
github_token: your_github_token_here
teams:
- Kyujin:
- 9
- 142
- 88
- Sumai:
- 17
- 29
- 31
- 131
- 140
- Kuruma:
- 139
- 138
- 94
- 90
- 93
- 120
- 128
- 147
- 121
- 116
- LS:
- 134
- PS:
- 145
- 141
- 144
- 151
- Sanko:
- 91
- 149
- CORDA:
- 92
- 112
- APW-Travelist-Air:
- 133
- APW-Travelist-Hotel:
- 148
- APW-Voyager:
- 146
- APW-SUB:
- 137
- All-team:
plugins/workflow_report/config/settings.yml
deleted
100644 → 0
View file @
e4ef2e78
teams
:
-
Kyujin
:
-
9
-
142
-
88
-
Sumai
:
-
17
-
29
-
31
-
131
-
140
-
Kuruma
:
-
139
-
138
-
94
-
90
-
93
-
120
-
128
-
147
-
121
-
116
-
LS
:
-
134
-
PS
:
-
145
-
141
-
144
-
151
-
Sanko
:
-
91
-
149
-
CORDA
:
-
92
-
112
-
APW-Travelist-Air
:
-
133
-
APW-Travelist-Hotel
:
-
148
-
APW-Voyager
:
-
146
-
APW-SUB
:
-
137
-
All-team
:
plugins/workflow_report/init.rb
View file @
a3f94b3f
...
...
@@ -11,10 +11,8 @@ Redmine::Plugin.register :workflow_report do
version
'0.0.1'
url
'http://example.com/path/to/plugin'
author_url
'http://example.com/about'
configfile
=
File
.
join
(
File
.
dirname
(
__FILE__
),
'config'
,
'settings.yml'
)
application_config
=
File
.
join
(
File
.
dirname
(
__FILE__
),
'config'
,
'application.yml'
)
$workflow_report_config
=
YAML
::
load_file
(
configfile
)
$app_report_config
=
YAML
::
load_file
(
application_config
)
configfile
=
File
.
join
(
File
.
dirname
(
__FILE__
),
'config'
,
'application.yml'
)
$app_report_config
=
YAML
::
load_file
(
configfile
)
project_module
:workflow_report
do
permission
:workflow_report_view_and_export
,
{
workflow_report:
%i[index export index_daily_report show_daily_report
index_time_entry export_time_entry]
},
require: :member
...
...
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