diff options
| author | Douwe Maan <douwe@gitlab.com> | 2017-05-30 13:32:39 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2017-05-30 13:32:39 +0000 |
| commit | 52a3d4372c6e45e4ffb792a9fe7bfca84f3573a3 (patch) | |
| tree | 35b80fd5034ce411af8d4c5102756cadfdda0256 /app/assets | |
| parent | 83550c02c0b3eea942ec34969d406e953d53b587 (diff) | |
| parent | a7349560b2d13ea7894a462738b3a7687fdbae72 (diff) | |
| download | gitlab-ce-52a3d4372c6e45e4ffb792a9fe7bfca84f3573a3.tar.gz | |
Merge branch '19107-404-when-creating-new-milestone-or-issue-for-project-that-has-issues-disabled' into 'master'
'New issue'/'New merge request' dropdowns should show only projects with issues/merge requests feature enabled
Closes #19107
See merge request !11754
Diffstat (limited to 'app/assets')
| -rw-r--r-- | app/assets/javascripts/project_select.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/project_select.js b/app/assets/javascripts/project_select.js index 0ff0a3b6cc4..9896b88d487 100644 --- a/app/assets/javascripts/project_select.js +++ b/app/assets/javascripts/project_select.js @@ -51,6 +51,9 @@ import Api from './api'; this.groupId = $(select).data('group-id'); this.includeGroups = $(select).data('include-groups'); this.orderBy = $(select).data('order-by') || 'id'; + this.withIssuesEnabled = $(select).data('with-issues-enabled'); + this.withMergeRequestsEnabled = $(select).data('with-merge-requests-enabled'); + placeholder = "Search for project"; if (this.includeGroups) { placeholder += " or group"; @@ -84,7 +87,11 @@ import Api from './api'; if (_this.groupId) { return Api.groupProjects(_this.groupId, query.term, projectsCallback); } else { - return Api.projects(query.term, { order_by: _this.orderBy }, projectsCallback); + return Api.projects(query.term, { + order_by: _this.orderBy, + with_issues_enabled: _this.withIssuesEnabled, + with_merge_requests_enabled: _this.withMergeRequestsEnabled + }, projectsCallback); } }; })(this), |
