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
0b57bebb
Commit
0b57bebb
authored
Sep 15, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update jira deployment_type only if allowed
parent
ced482c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+2
-1
changelogs/unreleased/247870-nomethoderror-saving-jira-integration-with-invalid-credentials.yml
...rror-saving-jira-integration-with-invalid-credentials.yml
+5
-0
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+10
-0
No files found.
app/models/project_services/jira_service.rb
View file @
0b57bebb
...
...
@@ -439,7 +439,8 @@ class JiraService < IssueTrackerService
end
def
update_deployment_type?
api_url_changed?
||
url_changed?
||
username_changed?
||
password_changed?
(
api_url_changed?
||
url_changed?
||
username_changed?
||
password_changed?
)
&&
can_test?
end
def
update_deployment_type
...
...
changelogs/unreleased/247870-nomethoderror-saving-jira-integration-with-invalid-credentials.yml
0 → 100644
View file @
0b57bebb
---
title
:
Fix exception when saving Jira integration info for an instance
merge_request
:
42361
author
:
type
:
fixed
spec/models/project_services/jira_service_spec.rb
View file @
0b57bebb
...
...
@@ -254,6 +254,16 @@ RSpec.describe JiraService do
end
end
context
'when not allowed to test an instance or group'
do
it
'does not update deployment type'
do
allow
(
service
).
to
receive
(
:can_test?
).
and_return
(
false
)
service
.
update!
(
url:
'http://first.url'
)
expect
(
WebMock
).
not_to
have_requested
(
:get
,
/serverInfo/
)
end
end
context
'stored password invalidation'
do
context
'when a password was previously set'
do
context
'when only web url present'
do
...
...
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