Merge pull request #296 from warpc/194-issue_page
[refs #194] fixed remove executor from issue
This commit is contained in:
commit
dc6e380647
|
@ -22,7 +22,7 @@ class ActivityFeedObserver < ActiveRecord::Observer
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if record.user_id_was != record.user_id
|
if record.user_id_changed?
|
||||||
UserMailer.delay.issue_assign_notification(record, record.user) if record.user.notifier.issue_assign && record.user.notifier.can_notify
|
UserMailer.delay.issue_assign_notification(record, record.user) if record.user.notifier.issue_assign && record.user.notifier.can_notify
|
||||||
ActivityFeed.create(
|
ActivityFeed.create(
|
||||||
:user => record.user,
|
:user => record.user,
|
||||||
|
@ -106,7 +106,7 @@ class ActivityFeedObserver < ActiveRecord::Observer
|
||||||
def after_update(record)
|
def after_update(record)
|
||||||
case record.class.to_s
|
case record.class.to_s
|
||||||
when 'Issue'
|
when 'Issue'
|
||||||
if record.user_id_was != record.user_id
|
if record.user_id && record.user_id_changed?
|
||||||
UserMailer.delay.issue_assign_notification(record, record.user) if record.user.notifier.issue_assign && record.user.notifier.can_notify
|
UserMailer.delay.issue_assign_notification(record, record.user) if record.user.notifier.issue_assign && record.user.notifier.can_notify
|
||||||
ActivityFeed.create(
|
ActivityFeed.create(
|
||||||
:user => record.user,
|
:user => record.user,
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Issue < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def subscribe_issue_assigned_user
|
def subscribe_issue_assigned_user
|
||||||
if self.user_id_was != self.user_id
|
if self.user_id && self.user_id_changed?
|
||||||
self.subscribes.where(:user_id => self.user_id_was).first.destroy unless self.user_id_was.blank?
|
self.subscribes.where(:user_id => self.user_id_was).first.destroy unless self.user_id_was.blank?
|
||||||
if self.user.notifier.issue_assign && !self.subscribes.exists?(:user_id => self.user_id)
|
if self.user.notifier.issue_assign && !self.subscribes.exists?(:user_id => self.user_id)
|
||||||
self.subscribes.create(:user_id => self.user_id)
|
self.subscribes.create(:user_id => self.user_id)
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
- if @issue.persisted?
|
- if @issue.persisted?
|
||||||
-if can_manage
|
-if can_manage
|
||||||
=form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_executor issue'} do |f|
|
=form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_executor issue'} do |f|
|
||||||
|
=hidden_field_tag "user-default_executor", nil, :name => 'issue[user_id]'
|
||||||
.current_executor
|
.current_executor
|
||||||
- if @issue.user
|
- if @issue.user
|
||||||
#user-0.people.nopointer
|
#user-0.people.nopointer
|
||||||
|
|
Loading…
Reference in New Issue