Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
993cff04
Commit
993cff04
authored
Jan 11, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove import_issues_csv feature flag
Also remove test for the feature flag
parent
6b2f81f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
17 deletions
+2
-17
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-2
app/views/projects/issues/_nav_btns.html.haml
app/views/projects/issues/_nav_btns.html.haml
+1
-1
app/views/shared/empty_states/_issues.html.haml
app/views/shared/empty_states/_issues.html.haml
+1
-1
spec/controllers/projects/issues_controller_spec.rb
spec/controllers/projects/issues_controller_spec.rb
+0
-13
No files found.
app/controllers/projects/issues_controller.rb
View file @
993cff04
...
...
@@ -178,8 +178,6 @@ class Projects::IssuesController < Projects::ApplicationController
end
def
import_csv
return
render_404
unless
Feature
.
enabled?
(
:issues_import_csv
)
if
uploader
=
UploadService
.
new
(
project
,
params
[
:file
]).
execute
ImportIssuesCsvWorker
.
perform_async
(
current_user
.
id
,
project
.
id
,
uploader
.
upload
.
id
)
...
...
app/views/projects/issues/_nav_btns.html.haml
View file @
993cff04
-
show_feed_buttons
=
local_assigns
.
fetch
(
:show_feed_buttons
,
true
)
-
show_import_button
=
local_assigns
.
fetch
(
:show_import_button
,
true
)
&&
Feature
.
enabled?
(
:issues_import_csv
)
&&
can?
(
current_user
,
:import_issues
,
@project
)
-
show_import_button
=
local_assigns
.
fetch
(
:show_import_button
,
true
)
&&
can?
(
current_user
,
:import_issues
,
@project
)
-
show_export_button
=
local_assigns
.
fetch
(
:show_export_button
,
true
)
.nav-controls.issues-nav-controls
...
...
app/views/shared/empty_states/_issues.html.haml
View file @
993cff04
-
button_path
=
local_assigns
.
fetch
(
:button_path
,
false
)
-
project_select_button
=
local_assigns
.
fetch
(
:project_select_button
,
false
)
-
show_import_button
=
local_assigns
.
fetch
(
:show_import_button
,
false
)
&&
Feature
.
enabled?
(
:issues_import_csv
)
&&
can?
(
current_user
,
:import_issues
,
@project
)
-
show_import_button
=
local_assigns
.
fetch
(
:show_import_button
,
false
)
&&
can?
(
current_user
,
:import_issues
,
@project
)
-
has_button
=
button_path
||
project_select_button
-
closed_issues_count
=
issuables_count_for_state
(
:issues
,
:closed
)
-
opened_issues_count
=
issuables_count_for_state
(
:issues
,
:opened
)
...
...
spec/controllers/projects/issues_controller_spec.rb
View file @
993cff04
...
...
@@ -1030,19 +1030,6 @@ describe Projects::IssuesController do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:file
)
{
fixture_file_upload
(
'spec/fixtures/csv_comma.csv'
)
}
context
'feature disabled'
do
it
'returns 404'
do
sign_in
(
user
)
project
.
add_maintainer
(
user
)
stub_feature_flags
(
issues_import_csv:
false
)
import_csv
expect
(
response
).
to
have_gitlab_http_status
:not_found
end
end
context
'unauthorized'
do
it
'returns 404 for guests'
do
sign_out
(
:user
)
...
...
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