Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
5a376063
Commit
5a376063
authored
Sep 27, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow /copy_metadata for new issues
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/50181
parent
62dde350
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
app/services/quick_actions/interpret_service.rb
app/services/quick_actions/interpret_service.rb
+1
-2
changelogs/unreleased/toon-copy-meta-data-fix.yml
changelogs/unreleased/toon-copy-meta-data-fix.yml
+5
-0
spec/services/quick_actions/interpret_service_spec.rb
spec/services/quick_actions/interpret_service_spec.rb
+9
-0
No files found.
app/services/quick_actions/interpret_service.rb
View file @
5a376063
...
...
@@ -290,7 +290,6 @@ module QuickActions
end
params
'#issue | !merge_request'
condition
do
issuable
.
persisted?
&&
current_user
.
can?
(
:"update_
#{
issuable
.
to_ability_name
}
"
,
issuable
)
end
parse_params
do
|
issuable_param
|
...
...
changelogs/unreleased/toon-copy-meta-data-fix.yml
0 → 100644
View file @
5a376063
---
title
:
Allow /copy_metadata for new issues and MRs
merge_request
:
21953
author
:
type
:
changed
spec/services/quick_actions/interpret_service_spec.rb
View file @
5a376063
# frozen_string_literal: true
require
'spec_helper'
describe
QuickActions
::
InterpretService
do
...
...
@@ -859,6 +861,13 @@ describe QuickActions::InterpretService do
let
(
:issuable
)
{
issue
}
end
it_behaves_like
'copy_metadata command'
do
let
(
:source_issuable
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
inreview_label
,
todo_label
])
}
let
(
:content
)
{
"/copy_metadata
#{
source_issuable
.
to_reference
}
"
}
let
(
:issuable
)
{
build
(
:issue
,
project:
project
)
}
end
it_behaves_like
'copy_metadata command'
do
let
(
:source_issuable
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
inreview_label
,
todo_label
])
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment