Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2016-10-27 00:21:50 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2016-12-05 22:55:45 +0300
commit1123057ab792ac73b1611f4d3a9faf79369dd6da (patch)
treeae88332a5d2d47d5a814583fbe874582ebaf859c /app/services/issuable_base_service.rb
parent5fedc46343d054df28ce81a320f33d1d43d02bc8 (diff)
Feature: delegate all open discussions to Issue
When a merge request can only be merged when all discussions are resolved. This feature allows to easily delegate those discussions to a new issue, while marking them as resolved in the merge request. The user is presented with a new issue, prepared with mentions of all unresolved discussions, including the first unresolved note of the discussion, time and link to the note. When the issue is created, the discussions in the merge request will get a system note directing the user to the newly created issue.
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r--app/services/issuable_base_service.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb
index ce68e433ab8..b5f63cc5a1a 100644
--- a/app/services/issuable_base_service.rb
+++ b/app/services/issuable_base_service.rb
@@ -120,9 +120,10 @@ class IssuableBaseService < BaseService
def merge_slash_commands_into_params!(issuable)
description, command_params =
SlashCommands::InterpretService.new(project, current_user).
- execute(params[:description], issuable)
+ execute(params[:description], issuable)
- params[:description] = description
+ # Avoid a description already set on an issuable to be overwritten by a nil
+ params[:description] = description if params.has_key?(:description)
params.merge!(command_params)
end