JIRA Integration: Inherited instance config do not allow enabling issues list at project level
Summary
When the JIRA integration is configured at the instance level, and Enable Jira issues
is then enabled at the project level, the Enable Jira issues
settings does not persist after clicking save.
Steps to reproduce
- Enable JIRA Integration at the instance level under Admin - Settings - Integrations - JIRA
- Go to any project,
Enable Jira issues
under Project - Settings - Integrations - JIRA - Save configs, page reloads
-
Enable Jira issues
is back to its unchecked default
Example Project
What is the current bug behavior?
Changes to Enable Jira issues
and other project-level overrides do not persist when JIRA settings are inherited from instance defaults.
What is the expected correct behavior?
Changes to Enable Jira issues
and other project-level overrides should persist when JIRA settings are inherited from instance defaults.
Relevant logs and/or screenshots
Log in production_json when the save is performed:
{
"method": "PUT",
"path": "/hoth/sample-ci/-/services/jira",
"format": "html",
"controller": "Projects::ServicesController",
"action": "update",
"status": 302,
"location": "https://URL/hoth/sample-ci/-/services/jira/edit",
"time": "2021-04-07T12:46:21.698Z",
"params": [
{
"key": "utf8",
"value": "✓"
},
{
"key": "_method",
"value": "put"
},
{
"key": "authenticity_token",
"value": "[FILTERED]"
},
{
"key": "service",
"value": {
"inherit_from_id": "2",
"active": "true",
"commit_events": "true",
"merge_requests_events": "true",
"comment_on_event_enabled": "true",
"comment_detail": "standard",
"url": "http://jira.example.com",
"api_url": "",
"username": "foobar",
"password": "[FILTERED]",
"jira_issue_transition_id": "",
"issues_enabled": "true",
"vulnerabilities_enabled": "false",
"project_key": "[FILTERED]"
}
},
{
"key": "redirect_to",
"value": "https://URL/hoth/sample-ci/-/settings/integrations"
},
{
"key": "namespace_id",
"value": "hoth"
},
{
"key": "project_id",
"value": "sample-ci"
},
{
"key": "id",
"value": "jira"
}
],
"remote_ip": "x.y.z.a",
"user_id": 1,
"username": "root",
"correlation_id": "01F2P5X3X6WYZDHAPCDV7VH9WG",
"meta.user": "root",
"meta.project": "hoth/sample-ci",
"meta.root_namespace": "hoth",
"meta.caller_id": "Projects::ServicesController#update",
"meta.feature_category": "integrations",
"meta.client_id": "user/1",
"redis_calls": 6,
"redis_duration_s": 0.001564,
"redis_read_bytes": 969,
"redis_write_bytes": 1085,
"redis_cache_calls": 5,
"redis_cache_duration_s": 0.001253,
"redis_cache_read_bytes": 610,
"redis_cache_write_bytes": 389,
"redis_shared_state_calls": 1,
"redis_shared_state_duration_s": 0.000311,
"redis_shared_state_read_bytes": 359,
"redis_shared_state_write_bytes": 696,
"db_count": 21,
"db_write_count": 4,
"db_cached_count": 1,
"cpu_s": 0.070538,
"mem_objects": 28295,
"mem_bytes": 3455463,
"mem_mallocs": 6883,
"queue_duration_s": 0.016477,
"db_duration_s": 0.0085,
"view_duration_s": 0.0,
"duration_s": 0.06257
}
Output of checks
Happens on self-managed instances, reported and reproduced on 13.10.0+
Results of GitLab environment info
Expand for output related to GitLab environment info
Premium customer ticket: https://gitlab.zendesk.com/agent/tickets/202845
Results of GitLab application Check
Expand for output related to the GitLab application check
Possible fixes
Workaround: Switch the project to use custom settings, and redefine all parameters. Now the settings persist, and remain persisted even if you switch back to defaults after.