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)