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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/graphql/mutations/issues/create.rb
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/graphql/mutations/issues/create.rb')
-rw-r--r--app/graphql/mutations/issues/create.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/app/graphql/mutations/issues/create.rb b/app/graphql/mutations/issues/create.rb
index 72b03cc27c2..6bf8caf82d7 100644
--- a/app/graphql/mutations/issues/create.rb
+++ b/app/graphql/mutations/issues/create.rb
@@ -3,12 +3,12 @@
module Mutations
module Issues
class Create < BaseMutation
+ graphql_name 'CreateIssue'
+
include Mutations::SpamProtection
include FindsProject
include CommonMutationArguments
- graphql_name 'CreateIssue'
-
authorize :create_issue
argument :project_path, GraphQL::Types::ID,
@@ -51,6 +51,14 @@ module Mutations
required: false,
description: 'Array of user IDs to assign to the issue.'
+ argument :move_before_id, ::Types::GlobalIDType[::Issue],
+ required: false,
+ description: 'Global ID of issue that should be placed before the current issue.'
+
+ argument :move_after_id, ::Types::GlobalIDType[::Issue],
+ required: false,
+ description: 'Global ID of issue that should be placed after the current issue.'
+
field :issue,
Types::IssueType,
null: true,
@@ -93,6 +101,13 @@ module Mutations
params[:assignee_ids] &&= params[:assignee_ids].map { |assignee_id| assignee_id&.model_id }
params[:label_ids] &&= params[:label_ids].map { |label_id| label_id&.model_id }
+ if params[:move_before_id].present? || params[:move_after_id].present?
+ params[:move_between_ids] = [
+ params.delete(:move_before_id)&.model_id,
+ params.delete(:move_after_id)&.model_id
+ ]
+ end
+
params
end