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
627f494a
Commit
627f494a
authored
Nov 15, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update IssuableCollections overrides
parent
5695ec95
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
27 deletions
+33
-27
app/controllers/concerns/issuable_collections.rb
app/controllers/concerns/issuable_collections.rb
+7
-2
ee/app/controllers/ee/projects/issues_controller.rb
ee/app/controllers/ee/projects/issues_controller.rb
+7
-7
ee/app/controllers/groups/epics_controller.rb
ee/app/controllers/groups/epics_controller.rb
+0
-12
ee/app/controllers/groups/issues_analytics_controller.rb
ee/app/controllers/groups/issues_analytics_controller.rb
+2
-2
ee/app/controllers/groups/roadmap_controller.rb
ee/app/controllers/groups/roadmap_controller.rb
+1
-2
ee/app/finders/epics_finder.rb
ee/app/finders/epics_finder.rb
+15
-0
ee/app/views/shared/epic/_search_bar.html.haml
ee/app/views/shared/epic/_search_bar.html.haml
+1
-2
No files found.
app/controllers/concerns/issuable_collections.rb
View file @
627f494a
...
...
@@ -86,14 +86,15 @@ module IssuableCollections
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def
finder_options
params
[
:state
]
=
default_state
if
params
[
:state
].
blank?
options
=
{
scope:
params
[
:scope
],
state:
params
[
:state
]
.
presence
||
'opened'
,
state:
params
[
:state
],
sort:
set_sort_order_from_cookie
||
default_sort_order
}
# Used by view to highlight active option
params
[
:state
]
=
options
[
:state
]
@sort
=
options
[
:sort
]
if
@project
...
...
@@ -108,6 +109,10 @@ module IssuableCollections
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
def
default_state
'opened'
end
def
set_sort_order_from_cookie
sort_param
=
params
[
:sort
]
if
params
[
:sort
].
present?
# fallback to legacy cookie value for backward compatibility
...
...
ee/app/controllers/ee/projects/issues_controller.rb
View file @
627f494a
...
...
@@ -36,7 +36,7 @@ module EE
end
def
export_csv
ExportCsvWorker
.
perform_async
(
current_user
.
id
,
project
.
id
,
fi
lter_param
s
.
to_h
)
ExportCsvWorker
.
perform_async
(
current_user
.
id
,
project
.
id
,
fi
nder_option
s
.
to_h
)
index_path
=
project_issues_path
(
project
)
redirect_to
(
index_path
,
notice:
"Your CSV export has started. It will be emailed to
#{
current_user
.
notification_email
}
when complete."
)
...
...
@@ -51,16 +51,16 @@ module EE
attrs
end
def
fi
lter_param
s
param
s
=
super
param
s
.
reject!
{
|
key
|
key
==
'weight'
}
unless
project
.
feature_available?
(
:issue_weights
)
def
fi
nder_option
s
option
s
=
super
option
s
.
reject!
{
|
key
|
key
==
'weight'
}
unless
project
.
feature_available?
(
:issue_weights
)
if
service_desk?
param
s
.
reject!
{
|
key
|
key
==
'author_username'
||
key
==
'author_id'
}
param
s
[
:author_id
]
=
::
User
.
support_bot
option
s
.
reject!
{
|
key
|
key
==
'author_username'
||
key
==
'author_id'
}
option
s
[
:author_id
]
=
::
User
.
support_bot
end
param
s
option
s
end
def
service_desk?
...
...
ee/app/controllers/groups/epics_controller.rb
View file @
627f494a
...
...
@@ -15,7 +15,6 @@ class Groups::EpicsController < Groups::ApplicationController
skip_before_action
:labels
def
index
set_default_state
@epics
=
@issuables
respond_to
do
|
format
|
...
...
@@ -98,18 +97,7 @@ class Groups::EpicsController < Groups::ApplicationController
@preload_for_collection
||=
[
:group
,
:author
]
end
# we need to override the default state which is opened for now because we don't have
# states for epics and need all as default for navigation to work correctly (#4017)
def
set_default_state
params
[
:state
]
=
'opened'
if
params
[
:state
].
blank?
end
def
authorize_create_epic!
return
render_404
unless
can?
(
current_user
,
:create_epic
,
group
)
end
def
filter_params
set_sort_order_from_cookie
super
.
merge
(
start_date:
params
[
:start_date
],
end_date:
params
[
:end_date
])
end
end
ee/app/controllers/groups/issues_analytics_controller.rb
View file @
627f494a
...
...
@@ -33,8 +33,8 @@ class Groups::IssuesAnalyticsController < Groups::ApplicationController
IssuesFinder
end
def
set_
default_state
params
[
:state
]
=
'all'
if
params
[
:state
].
blank?
def
default_state
'all'
end
def
preload_for_collection
...
...
ee/app/controllers/groups/roadmap_controller.rb
View file @
627f494a
...
...
@@ -9,8 +9,7 @@ module Groups
def
show
# show roadmap for a group
set_sort_order_from_cookie
@sort
=
params
[
:sort
]
||
default_sort_order
@sort
=
set_sort_order_from_cookie
||
default_sort_order
@epics_count
=
EpicsFinder
.
new
(
current_user
,
group_id:
@group
.
id
).
execute
.
count
end
...
...
ee/app/finders/epics_finder.rb
View file @
627f494a
class
EpicsFinder
<
IssuableFinder
def
self
.
scalar_params
@scalar_params
||=
%i[
author_id
author_username
label_name
start_date
end_date
search
]
end
def
self
.
array_params
@array_params
||=
{
label_name:
[]
}
end
def
klass
Epic
end
...
...
ee/app/views/shared/epic/_search_bar.html.haml
View file @
627f494a
-
type
=
local_assigns
.
fetch
(
:type
)
-
hide_sort_dropdown
=
local_assigns
.
fetch
(
:hide_sort_dropdown
,
false
)
-
show_roadmap_presets
=
local_assigns
.
fetch
(
:show_roadmap_presets
,
false
)
-
full_path
=
@project
.
present?
?
@project
.
full_path
:
@group
.
full_path
-
preset_layout
=
roadmap_layout
-
is_quarters
=
preset_layout
==
"QUARTERS"
-
is_months
=
preset_layout
==
"MONTHS"
...
...
@@ -31,7 +30,7 @@
dropdown_class:
"filtered-search-history-dropdown"
,
content_class:
"filtered-search-history-dropdown-content"
,
title:
"Recent searches"
})
do
.js-filtered-search-history-dropdown
{
data:
{
full_path:
full_path
}
}
.js-filtered-search-history-dropdown
{
data:
{
full_path:
search_history_storage_prefix
}
}
.filtered-search-box-input-container.droplab-dropdown
.scroll-container
%ul
.tokens-container.list-unstyled
...
...
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