From ea67261275af208cecf77524c3649410cbbfe31a Mon Sep 17 00:00:00 2001 From: OZAWA Yasuhiro Date: Wed, 18 Jun 2014 22:04:14 +0900 Subject: [PATCH] =?UTF-8?q?2.3=E3=81=AE=E3=82=AF=E3=82=A8=E3=83=AA?= =?UTF-8?q?=E3=81=AE=E5=AE=9F=E8=A3=85=E5=A4=89=E6=9B=B4=E3=81=AB=E4=BB=AE?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.rdoc | 7 +++++++ init.rb | 4 ++-- lib/already_read/issue_query_patch.rb | 11 ++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.rdoc b/README.rdoc index 0e8bf9a..8fcf1f3 100644 --- a/README.rdoc +++ b/README.rdoc @@ -3,6 +3,8 @@ チケットの既読/未読を管理し、チケット一覧に「既読」「読んだ日時」列を追加します。 チケットを更新すると、そのチケットは未読チケットに戻ります。 +Redmine2.5.1で簡単な動作確認したのみ。 + == インストール @@ -35,6 +37,11 @@ == 更新履歴 +=== Version 0.0.4 + +2.3のクエリの実装変更に仮対応。 + + === Version 0.0.3 "活動"にチケットを読んだことが残るようにしました。 diff --git a/init.rb b/init.rb index 7acc6f0..5fb9352 100644 --- a/init.rb +++ b/init.rb @@ -2,13 +2,13 @@ require 'already_read/issue_patch' require 'already_read/issues_controller_patch' require 'already_read/user_patch' -require 'already_read/query_patch' +require 'already_read/issue_query_patch' Redmine::Plugin.register :redmine_already_read do name 'Redmine Already Read plugin' author 'OZAWA Yasuhiro' description 'Markup read issues.' - version '0.0.3' + version '0.0.4' url 'https://github.com/ameya86/redmine_already_read' author_url 'http://blog.livedoor.jp/ameya86/' diff --git a/lib/already_read/issue_query_patch.rb b/lib/already_read/issue_query_patch.rb index 0cb6137..9a88e22 100644 --- a/lib/already_read/issue_query_patch.rb +++ b/lib/already_read/issue_query_patch.rb @@ -1,9 +1,10 @@ require_dependency 'query' +require_dependency 'issue_query' -Query.add_available_column(QueryColumn.new(:already_read)) -Query.add_available_column(QueryColumn.new(:already_read_date)) +IssueQuery.add_available_column(QueryColumn.new(:already_read)) +IssueQuery.add_available_column(QueryColumn.new(:already_read_date)) -module AlreadyReadQueryPatch +module AlreadyReadIssueQueryPatch def self.included(base) # :nodoc: base.send(:include, InstanceMethods) # obj.method @@ -27,7 +28,7 @@ def available_filters_with_already_read end end -class Query < ActiveRecord::Base +class IssueQuery < Query # 既読/未読検出のSQL def sql_for_already_read_field(field, operator, value) db_table = AlreadyRead.table_name @@ -47,4 +48,4 @@ def sql_for_already_read_field(field, operator, value) end end -Query.send(:include, AlreadyReadQueryPatch) +IssueQuery.send(:include, AlreadyReadIssueQueryPatch)