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
8d06b52e
Commit
8d06b52e
authored
Mar 24, 2021
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent executing expensive query to show group issues zero state view
parent
267830be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
26 deletions
+24
-26
app/views/groups/issues.html.haml
app/views/groups/issues.html.haml
+21
-24
app/views/shared/_issues.html.haml
app/views/shared/_issues.html.haml
+2
-1
spec/features/groups/issues_spec.rb
spec/features/groups/issues_spec.rb
+1
-1
No files found.
app/views/groups/issues.html.haml
View file @
8d06b52e
...
...
@@ -5,10 +5,7 @@
=
content_for
:meta_tags
do
=
auto_discovery_link_tag
(
:atom
,
safe_params
.
merge
(
rss_url_options
).
to_h
,
title:
"
#{
@group
.
name
}
issues"
)
-
if
group_issues_count
(
state:
'all'
)
==
0
=
render
'shared/empty_states/issues'
,
project_select_button:
true
-
else
.top-area
.top-area
=
render
'shared/issuable/nav'
,
type: :issues
.nav-controls
=
render
'shared/issuable/feed_buttons'
...
...
@@ -18,12 +15,12 @@
=
render
'shared/new_project_item_select'
,
path:
'issues/new'
,
label:
"New issue"
,
type: :issues
,
with_feature_enabled:
'issues'
,
with_shared:
false
,
include_projects_in_subgroups:
true
=
render
'shared/issuable/search_bar'
,
type: :issues
=
render
'shared/issuable/search_bar'
,
type: :issues
-
if
@can_bulk_update
-
if
@can_bulk_update
=
render_if_exists
'shared/issuable/group_bulk_update_sidebar'
,
group:
@group
,
type: :issues
-
if
Feature
.
enabled?
(
:vue_issuables_list
,
@group
)
-
if
Feature
.
enabled?
(
:vue_issuables_list
,
@group
)
&&
@issues
.
to_a
.
any?
-
if
use_startup_call?
-
add_page_startup_api_call
(
api_v4_groups_issues_path
(
id:
@group
.
id
,
params:
startup_call_params
))
.js-issuables-list
{
data:
{
endpoint:
expose_url
(
api_v4_groups_issues_path
(
id:
@group
.
id
)),
...
...
@@ -32,5 +29,5 @@
'sort-key'
:
@sort
,
type:
'issues'
,
'scoped-labels-available'
:
scoped_labels_available?
(
@group
).
to_json
}
}
-
else
=
render
'shared/issues'
-
else
=
render
'shared/issues'
,
project_select_button:
true
app/views/shared/_issues.html.haml
View file @
8d06b52e
...
...
@@ -3,4 +3,5 @@
=
render
partial:
'projects/issues/issue'
,
collection:
@issues
=
paginate
@issues
,
theme:
"gitlab"
-
else
=
render
'shared/empty_states/issues'
-
project_select_button
=
local_assigns
.
fetch
(
:project_select_button
,
false
)
=
render
'shared/empty_states/issues'
,
project_select_button:
project_select_button
spec/features/groups/issues_spec.rb
View file @
8d06b52e
...
...
@@ -108,7 +108,7 @@ RSpec.describe 'Group issues page' do
it
'shows projects only with issues feature enabled'
,
:js
do
find
(
'.empty-state .js-lazy-loaded'
)
find
(
'.new-project-item-link'
).
click
find
(
'.
empty-state .
new-project-item-link'
).
click
page
.
within
(
'.select2-results'
)
do
expect
(
page
).
to
have_content
(
project
.
full_name
)
...
...
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