diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 06:07:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 06:07:50 +0300 |
commit | 38bab6e1581d30c0e9d312474fd796404cc7b484 (patch) | |
tree | e4e6b11e2788cae577ecb1efa5195f9bc77b83f2 /app | |
parent | 47b8f79a0896f406008d5a7eda2781f8da301e91 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/error_tracking/components/error_details.vue | 6 | ||||
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 5 | ||||
-rw-r--r-- | app/models/issue.rb | 2 | ||||
-rw-r--r-- | app/models/sentry_issue.rb | 4 |
4 files changed, 14 insertions, 3 deletions
diff --git a/app/assets/javascripts/error_tracking/components/error_details.vue b/app/assets/javascripts/error_tracking/components/error_details.vue index 9cf141589db..14b2e59009a 100644 --- a/app/assets/javascripts/error_tracking/components/error_details.vue +++ b/app/assets/javascripts/error_tracking/components/error_details.vue @@ -118,13 +118,17 @@ export default { <div v-if="loading" class="py-3"> <gl-loading-icon :size="3" /> </div> - <div v-else-if="showDetails" class="error-details"> <div class="top-area align-items-center justify-content-between py-3"> <span v-if="!loadingStacktrace && stacktrace" v-html="reported"></span> <form ref="sentryIssueForm" :action="projectIssuesPath" method="POST"> <gl-form-input class="hidden" name="issue[title]" :value="issueTitle" /> <input name="issue[description]" :value="issueDescription" type="hidden" /> + <gl-form-input + :value="error.id" + class="hidden" + name="issue[sentry_issue_attributes][sentry_issue_identifier]" + /> <gl-form-input :value="csrfToken" class="hidden" name="authenticity_token" /> <loading-button v-if="!error.gitlab_issue" diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 5cbfabebe39..229374c3929 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -237,7 +237,10 @@ class Projects::IssuesController < Projects::ApplicationController end def issue_params - params.require(:issue).permit(*issue_params_attributes) + params.require(:issue).permit( + *issue_params_attributes, + sentry_issue_attributes: [:sentry_issue_identifier] + ) end def issue_params_attributes diff --git a/app/models/issue.rb b/app/models/issue.rb index d49f3c28000..f16fd8e63ec 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -45,6 +45,8 @@ class Issue < ApplicationRecord has_many :user_mentions, class_name: "IssueUserMention" has_one :sentry_issue + accepts_nested_attributes_for :sentry_issue + validates :project, presence: true alias_attribute :parent_ids, :project_id diff --git a/app/models/sentry_issue.rb b/app/models/sentry_issue.rb index 678e09b5370..6be52f99562 100644 --- a/app/models/sentry_issue.rb +++ b/app/models/sentry_issue.rb @@ -4,5 +4,7 @@ class SentryIssue < ApplicationRecord belongs_to :issue validates :issue, uniqueness: true, presence: true - validates :sentry_issue_identifier, presence: true + validates :sentry_issue_identifier, + uniqueness: true, + presence: true end |