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
672fb06c
Commit
672fb06c
authored
Feb 10, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address backend reviewer feedback
Memoize issue_json method
parent
73cae9df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
app/helpers/services_helper.rb
app/helpers/services_helper.rb
+2
-2
ee/app/controllers/projects/integrations/jira/issues_controller.rb
...ntrollers/projects/integrations/jira/issues_controller.rb
+3
-4
ee/app/views/projects/integrations/jira/issues/show.html.haml
...pp/views/projects/integrations/jira/issues/show.html.haml
+2
-2
No files found.
app/helpers/services_helper.rb
View file @
672fb06c
...
...
@@ -128,10 +128,10 @@ module ServicesHelper
!
Gitlab
.
com?
end
def
jira_issue_breadcrumb_link
(
issue_
json
)
def
jira_issue_breadcrumb_link
(
issue_
reference
)
link_to
''
,
{
class:
'gl-display-flex gl-align-items-center gl-white-space-nowrap'
}
do
icon
=
image_tag
image_path
(
'illustrations/logos/jira.svg'
),
width:
15
,
height:
15
,
class:
'gl-mr-2'
[
icon
,
issue_
json
[
:references
][
:relative
]
].
join
.
html_safe
[
icon
,
issue_
reference
].
join
.
html_safe
end
end
...
...
ee/app/controllers/projects/integrations/jira/issues_controller.rb
View file @
672fb06c
...
...
@@ -14,6 +14,7 @@ module Projects
before_action
:check_feature_enabled!
before_action
:check_issues_show_enabled!
,
only: :show
before_action
:issue_json
,
only: :show
before_action
do
push_frontend_feature_flag
(
:jira_issues_integration
,
project
,
type: :licensed
,
default_enabled:
true
)
...
...
@@ -37,8 +38,6 @@ module Projects
end
def
show
@issue
=
issue_json
respond_to
do
|
format
|
format
.
html
format
.
json
do
...
...
@@ -66,8 +65,8 @@ module Projects
end
def
issue_json
::
Integrations
::
Jira
::
IssueDetailSerializer
.
new
.
represent
(
project
.
jira_service
.
find_issue
(
params
[
:id
],
rendered_fields:
true
),
project:
project
)
@issue_json
||=
::
Integrations
::
Jira
::
IssueDetailSerializer
.
new
.
represent
(
project
.
jira_service
.
find_issue
(
params
[
:id
],
rendered_fields:
true
),
project:
project
)
end
def
finder
...
...
ee/app/views/projects/integrations/jira/issues/show.html.haml
View file @
672fb06c
-
add_to_breadcrumbs
_
(
'Jira Issues'
),
project_integrations_jira_issues_path
(
@project
)
-
breadcrumb_title
jira_issue_breadcrumb_link
(
@issue
)
-
page_title
@issue
[
:title
]
-
breadcrumb_title
jira_issue_breadcrumb_link
(
@issue
_json
[
:references
][
:relative
]
)
-
page_title
@issue
_json
[
:title
]
.js-jira-issues-show-app
{
data:
jira_issues_show_data
}
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