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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d6167735
Commit
d6167735
authored
Sep 04, 2020
by
Patrick Herlihy
Committed by
Nick Thomas
Sep 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Touch merge request updated_at when assignees changed
parent
88c27cb9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
app/models/merge_request_assignee.rb
app/models/merge_request_assignee.rb
+1
-1
changelogs/unreleased/pherlihy-master-patch-95213.yml
changelogs/unreleased/pherlihy-master-patch-95213.yml
+5
-0
spec/features/merge_request/user_assigns_themselves_spec.rb
spec/features/merge_request/user_assigns_themselves_spec.rb
+4
-0
No files found.
app/models/merge_request_assignee.rb
View file @
d6167735
# frozen_string_literal: true
# frozen_string_literal: true
class
MergeRequestAssignee
<
ApplicationRecord
class
MergeRequestAssignee
<
ApplicationRecord
belongs_to
:merge_request
belongs_to
:merge_request
,
touch:
true
belongs_to
:assignee
,
class_name:
"User"
,
foreign_key: :user_id
,
inverse_of: :merge_request_assignees
belongs_to
:assignee
,
class_name:
"User"
,
foreign_key: :user_id
,
inverse_of: :merge_request_assignees
validates
:assignee
,
uniqueness:
{
scope: :merge_request_id
}
validates
:assignee
,
uniqueness:
{
scope: :merge_request_id
}
...
...
changelogs/unreleased/pherlihy-master-patch-95213.yml
0 → 100644
View file @
d6167735
---
title
:
Change merge request updated_at when assignees are changed
merge_request
:
41030
author
:
Patrick Herlihy
type
:
fixed
spec/features/merge_request/user_assigns_themselves_spec.rb
View file @
d6167735
...
@@ -21,6 +21,10 @@ RSpec.describe 'Merge request > User assigns themselves' do
...
@@ -21,6 +21,10 @@ RSpec.describe 'Merge request > User assigns themselves' do
expect
(
page
).
to
have_content
'2 issues have been assigned to you'
expect
(
page
).
to
have_content
'2 issues have been assigned to you'
end
end
it
'updates updated_by'
,
:js
do
expect
{
click_button
'assign yourself'
}.
to
change
{
merge_request
.
reload
.
updated_at
}
end
it
'returns user to the merge request'
,
:js
do
it
'returns user to the merge request'
,
:js
do
click_link
'Assign yourself to these issues'
click_link
'Assign yourself to these issues'
...
...
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