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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c777bb91
Commit
c777bb91
authored
Oct 07, 2016
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue index CSV uses currently applied filters
parent
17600f5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+1
-0
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+1
-1
spec/features/issues/csv_spec.rb
spec/features/issues/csv_spec.rb
+7
-0
No files found.
app/finders/issuable_finder.rb
View file @
c777bb91
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#
#
class
IssuableFinder
class
IssuableFinder
NONE
=
'0'
NONE
=
'0'
VALID_PARAMS
=
%i(scope state group_id project_id milestone_title assignee_id search label_name sort)
attr_accessor
:current_user
,
:params
attr_accessor
:current_user
,
:params
...
...
app/views/projects/issues/index.html.haml
View file @
c777bb91
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
-
if
current_user
-
if
current_user
=
link_to
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
class:
'btn append-right-10 has-tooltip'
,
title:
'Subscribe'
do
=
link_to
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
class:
'btn append-right-10 has-tooltip'
,
title:
'Subscribe'
do
=
icon
(
'rss'
)
=
icon
(
'rss'
)
=
link_to
namespace_project_issues_path
(
@project
.
namespace
,
@project
,
:csv
),
class:
'btn append-right-10 has-tooltip'
,
title:
'Download CSV'
do
=
link_to
namespace_project_issues_path
(
@project
.
namespace
,
@project
,
params
.
permit
(
IssuableFinder
::
VALID_PARAMS
).
merge
(
format: :csv
)
),
class:
'btn append-right-10 has-tooltip'
,
title:
'Download CSV'
do
=
icon
(
'download'
)
=
icon
(
'download'
)
-
if
can?
current_user
,
:create_issue
,
@project
-
if
can?
current_user
,
:create_issue
,
@project
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
...
...
spec/features/issues/csv_spec.rb
View file @
c777bb91
...
@@ -23,6 +23,13 @@ describe 'Issues csv', feature: true do
...
@@ -23,6 +23,13 @@ describe 'Issues csv', feature: true do
expect
(
csv
.
count
).
to
eq
31
expect
(
csv
.
count
).
to
eq
31
end
end
it
'uses filters from issue index'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
state: :closed
)
click_on
'Download CSV'
expect
(
csv
.
count
).
to
eq
0
end
context
'includes'
do
context
'includes'
do
let
(
:label1
)
{
create
(
:label
,
project:
project
,
title:
'Feature'
)
}
let
(
:label1
)
{
create
(
:label
,
project:
project
,
title:
'Feature'
)
}
let
(
:label2
)
{
create
(
:label
,
project:
project
,
title:
'labels'
)
}
let
(
:label2
)
{
create
(
:label
,
project:
project
,
title:
'labels'
)
}
...
...
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