|
|
@ -119,6 +119,7 @@ class IssuesController < ApplicationController
|
|
|
|
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
|
|
|
|
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
|
|
|
|
|
|
|
|
|
|
|
|
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
|
|
|
|
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
|
|
|
|
|
|
|
|
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
|
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html {
|
|
|
|
format.html {
|
|
|
@ -194,6 +195,30 @@ class IssuesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
if saved
|
|
|
|
if saved
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#修改界面增加跟踪者
|
|
|
|
|
|
|
|
watcherlist = @issue.watcher_users
|
|
|
|
|
|
|
|
select_users = []
|
|
|
|
|
|
|
|
if params[:issue]
|
|
|
|
|
|
|
|
if params[:issue][:watcher_user_ids]
|
|
|
|
|
|
|
|
params[:issue][:watcher_user_ids].each do |user_id|
|
|
|
|
|
|
|
|
select_users << User.find(user_id)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
select_users.each do |user|
|
|
|
|
|
|
|
|
if watcherlist.include? user
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
@issue.add_watcher user
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
watcherlist.each do |user|
|
|
|
|
|
|
|
|
if select_users.include? user
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
@issue.remove_watcher user
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
render_attachment_warning_if_needed(@issue)
|
|
|
|
render_attachment_warning_if_needed(@issue)
|
|
|
|
reply_id = params[:reference_user_id].to_i
|
|
|
|
reply_id = params[:reference_user_id].to_i
|
|
|
|
if reply_id > 0
|
|
|
|
if reply_id > 0
|
|
|
|