diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-21 15:06:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-21 15:06:40 +0300 |
commit | 0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1 (patch) | |
tree | 9ff7dd7b21a3f9642a8fbb45c922f71a433faf02 /app/services/error_tracking/list_issues_service.rb | |
parent | a048261403ea7e12992ccffe704f0779235712d7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/error_tracking/list_issues_service.rb')
-rw-r--r-- | app/services/error_tracking/list_issues_service.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/services/error_tracking/list_issues_service.rb b/app/services/error_tracking/list_issues_service.rb index 0c2183dc36e..a2c8e6e6619 100644 --- a/app/services/error_tracking/list_issues_service.rb +++ b/app/services/error_tracking/list_issues_service.rb @@ -4,6 +4,7 @@ module ErrorTracking class ListIssuesService < ErrorTracking::BaseService DEFAULT_ISSUE_STATUS = 'unresolved' DEFAULT_LIMIT = 20 + DEFAULT_SORT = 'last_seen' def execute return error('Error Tracking is not enabled') unless enabled? @@ -12,7 +13,8 @@ module ErrorTracking result = project_error_tracking_setting.list_sentry_issues( issue_status: issue_status, limit: limit, - search_term: search_term + search_term: search_term, + sort: sort ) # our results are not yet ready @@ -33,10 +35,6 @@ module ErrorTracking private - def fetch - project_error_tracking_setting.list_sentry_issues(issue_status: issue_status, limit: limit) - end - def parse_response(response) { issues: response[:issues] } end @@ -60,5 +58,9 @@ module ErrorTracking def can_read? can?(current_user, :read_sentry_issue, project) end + + def sort + params[:sort] || DEFAULT_SORT + end end end |