diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f8bae6cb..3bcff9e7 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -229,12 +229,6 @@ class IssuesController < ApplicationController User.current.at_messages.unviewed('Journal', j.id).each {|x| x.viewed!} end - # 缺陷状态消息更新 - query_journals_ids = @issue.journals.map{|journal| journal.id} - if query_journals_ids.length > 0 - query_journals = ForgeMessage.where("user_id =? and forge_message_type =? and forge_message_id in (#{query_journals_ids.join(",")})", User.current.id, "Journal") - query_journals.update_all(:viewed => true) - end @jour_reply = Journal.new @journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id desc").all diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 8078da87..5e01aa62 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -332,9 +332,7 @@ class ProjectsController < ApplicationController def show # 顶部导航 @project_menu_type = 1 - # 更新消息为已读 - update_message_status(User.current, @project) - # over + if params[:jump] && redirect_to_project_menu_item(@project, params[:jump]) return end diff --git a/app/models/issue.rb b/app/models/issue.rb index 1f94889a..e4ac2a17 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -91,10 +91,10 @@ class Issue < ActiveRecord::Base attr_reader :current_journal # fq - after_create :act_as_activity,:be_user_score_new_issue,:act_as_forge_activity, :add_issues_count, :send_tiding + after_create :act_as_forge_activity, :add_issues_count, :send_tiding + + after_update :be_user_score, :update_activity - after_update :be_user_score,:update_activity - after_destroy :down_user_score, :decrease_issues_count # after_create :be_user_score # end diff --git a/app/views/layouts/_base_project_top.html.erb b/app/views/layouts/_base_project_top.html.erb index f46000d3..7b57b543 100644 --- a/app/views/layouts/_base_project_top.html.erb +++ b/app/views/layouts/_base_project_top.html.erb @@ -1,21 +1,19 @@ <% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %> <% project_issue_count = @project.issues.count %> -<% training_tasks_count = @project.training_tasks.count %> <% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %> -<% raodmaps = Version.where("project_id = ?", @project.id).count %> <% project_score = @project.project_score %> <%# 更新访问数,刷新的时候更新访问次数 %> -<% update_visiti_count(@project) if @project.try(:id) %> +<% update_visiti_count(@project) if @project.try(:id) %>