Commit a173fcce authored by Mike Greiling's avatar Mike Greiling

Merge branch '223917-jira-issue-list-page-refinements' into 'master'

Refine Jira issues list page

Closes #223917

See merge request gitlab-org/gitlab!36520
parents d21fcf76 c7cc3bb1
......@@ -36,7 +36,7 @@ function mountIssuableListRootApp() {
}
function mountIssuablesListApp() {
if (!gon.features?.vueIssuablesList) {
if (!gon.features?.vueIssuablesList && !gon.features?.jiraIntegration) {
return;
}
......
......@@ -128,7 +128,7 @@ class JiraService < IssueTrackerService
end
def new_issue_url
"#{url}/secure/CreateIssue.jspa"
"#{url}/secure/CreateIssue!default.jspa"
end
alias_method :original_url, :url
......
......@@ -12,7 +12,6 @@ module Projects
before_action do
push_frontend_feature_flag(:jira_integration, project)
push_frontend_feature_flag(:vue_issuables_list, project)
end
def index
......@@ -70,7 +69,7 @@ module Projects
protected
def check_feature_enabled!
return render_404 unless Feature.enabled?(:jira_integration, project)
return render_404 unless Feature.enabled?(:jira_integration, project) && project.external_issue_tracker
end
def render_bad_request(error)
......
.nav-controls.issues-nav-controls.gl-my-5
= link_to @project.external_issue_tracker.new_issue_url, class: 'btn gl-button', target: '_blank', rel: 'noopener noreferrer' do
= _('Create new issue in Jira')
= sprite_icon('external-link', css_class: 'gl-ml-1')
- page_title _('Jira Issues')
.top-area.gl-border-b-0.gl-justify-content-end
= render 'projects/integrations/jira/issues/nav_btns'
.js-issuables-list{ data: { endpoint: expose_path(project_integrations_jira_issues_path(@project, format: :json)),
'can-bulk-edit': false,
'empty-svg-path': image_path('illustrations/issues.svg'),
......
......@@ -171,6 +171,7 @@ RSpec.describe Projects::Integrations::Jira::IssuesController do
before do
sign_in user
project.add_developer(user)
create(:jira_service, project: project)
end
it_behaves_like 'unauthorized when external service denies access' do
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Jira issues list' do
let_it_be(:project) { create(:project) }
let_it_be(:jira_integration) { create(:jira_service, project: project, issues_enabled: true) }
let(:user) { create(:user) }
before do
project.add_user(user, :developer)
sign_in(user)
end
it 'renders "Create new issue" button' do
visit project_integrations_jira_issues_path(project)
expect(page).to have_link('Create new issue in Jira')
end
end
......@@ -6871,6 +6871,9 @@ msgstr ""
msgid "Create new file or directory"
msgstr ""
msgid "Create new issue in Jira"
msgstr ""
msgid "Create new label"
msgstr ""
......
......@@ -724,7 +724,7 @@ RSpec.describe JiraService do
describe '#new_issue_url' do
it 'handles trailing slashes' do
expect(service.new_issue_url).to eq('http://jira.test.com/path/secure/CreateIssue.jspa')
expect(service.new_issue_url).to eq('http://jira.test.com/path/secure/CreateIssue!default.jspa')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment