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
Jérome Perrin
gitlab-ce
Commits
0f2a9681
Commit
0f2a9681
authored
May 04, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Multiple issue assignees] Resolving conflicts
parent
4b1d580a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
18 deletions
+3
-18
app/models/issue_assignee.rb
app/models/issue_assignee.rb
+0
-16
app/models/user.rb
app/models/user.rb
+0
-1
app/services/notification_service.rb
app/services/notification_service.rb
+3
-1
No files found.
app/models/issue_assignee.rb
View file @
0f2a9681
...
...
@@ -7,23 +7,7 @@ class IssueAssignee < ActiveRecord::Base
after_create
:update_assignee_cache_counts
after_destroy
:update_assignee_cache_counts
# EE-specific
after_create
:update_elasticsearch_index
after_destroy
:update_elasticsearch_index
# EE-specific
def
update_assignee_cache_counts
assignee
&
.
update_cache_counts
end
def
update_elasticsearch_index
if
current_application_settings
.
elasticsearch_indexing?
ElasticIndexerWorker
.
perform_async
(
:update
,
'Issue'
,
issue
.
id
,
changed_fields:
[
'assignee_ids'
]
)
end
end
end
app/models/user.rb
View file @
0f2a9681
...
...
@@ -89,7 +89,6 @@ class User < ActiveRecord::Base
has_many
:subscriptions
,
dependent: :destroy
has_many
:recent_events
,
->
{
order
"id DESC"
},
foreign_key: :author_id
,
class_name:
"Event"
has_many
:oauth_applications
,
class_name:
'Doorkeeper::Application'
,
as: :owner
,
dependent: :destroy
has_one
:abuse_report
,
dependent: :destroy
,
foreign_key: :user_id
has_many
:reported_abuse_reports
,
dependent: :destroy
,
foreign_key: :reporter_id
,
class_name:
"AbuseReport"
has_many
:spam_logs
,
dependent: :destroy
...
...
app/services/notification_service.rb
View file @
0f2a9681
...
...
@@ -74,12 +74,14 @@ class NotificationService
previous_assignee:
previous_assignees
)
previous_assignee_ids
=
previous_assignees
.
map
(
&
:id
)
recipients
.
each
do
|
recipient
|
mailer
.
send
(
:reassigned_issue_email
,
recipient
.
id
,
issue
.
id
,
previous_assignee
s
.
map
(
&
:id
)
,
previous_assignee
_ids
,
current_user
.
id
).
deliver_later
end
...
...
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