1. Takashi Takebayashi
  2. redmine_issue_extensions

Commits

Takashi Takebayashi  committed 8ac5401

refs #1089 Compatible with Redmine 2.0.0

  • Participants
  • Parent commits 8f389b3
  • Branches default

Comments (0)

Files changed (2)

File config/routes.rb

View file
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-ActionController::Routing::Routes.draw do |map|
-  map.connect 'issue_extensions/:action', :controller => 'issue_extensions'
-  map.connect 'issue_extensions_settings/:action', :controller => 'issue_extensions_settings'
-  map.connect 'issue_relations/:action', :controller => 'issue_relations'
+RedmineApp::Application.routes.draw do
+  match 'issue_extensions/:action', :controller => 'issue_extensions', :via => [:get, :post]
+  match 'issue_extensions_settings/:action', :controller => 'issue_extensions_settings'
+  match 'issue_relations/:action', :controller => 'issue_relations', :via => [:get, :post]
 end

File lib/issue_extensions_issue_patch.rb

View file
-# Issue Extensions plugin for Redmine
-# Copyright (C) 2010  Takashi Takebayashi
+## Issue Extensions plugin for Redmine
+## Copyright (C) 2010-2012  Takashi Takebayashi
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#require_dependency 'issue'
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+#module IssueExtensionsIssuePatch
+#  def self.included base # :nodoc:
+#    base.extend ClassMethods
+#    base.send :include, InstanceMethods
+#    base.class_eval do
+#      alias_method_chain :validate, :issue_extensions
+#    end
+#  end
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+#  module ClassMethods
+#  end
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-require_dependency 'issue'
-
-module IssueExtensionsIssuePatch
-  def self.included base # :nodoc:
-    base.extend ClassMethods
-    base.send :include, InstanceMethods
-    base.class_eval do
-      alias_method_chain :validate, :issue_extensions
-    end
-  end
-
-  module ClassMethods
-  end
-
-  module InstanceMethods
-    # トラッカーがバグ、ステータスが終了のチケットに対象バージョンが入力されていない場合はエラーにする
-    def validate_with_issue_extensions
-      validate_without_issue_extensions
-#      project = Project.find read_attribute :project_id
-#      unless project.module_enabled? :issue_extensions == nil
-#        tracker = Tracker.find :first, :conditions => ["name = (?)", 'バグ']
-#        issue_status = IssueStatus.find :first, :conditions => ["name = (?)", '終了']
-#        if tracker != nil && issue_status != nil
-#          if tracker.id == read_attribute(:tracker_id) && issue_status.id == read_attribute(:status_id)
-#            errors.add :fixed_version_id, :empty if read_attribute(:fixed_version_id).blank?
-#          end
-#        end
-#      end
-    end
-  end
-end
-Issue.send(:include, IssueExtensionsIssuePatch)
+#  module InstanceMethods
+#    # トラッカーがバグ、ステータスが終了のチケットに対象バージョンが入力されていない場合はエラーにする
+#    def validate_with_issue_extensions
+#      validate_without_issue_extensions
+##      project = Project.find read_attribute :project_id
+##      unless project.module_enabled? :issue_extensions == nil
+##        tracker = Tracker.find :first, :conditions => ["name = (?)", 'バグ']
+##        issue_status = IssueStatus.find :first, :conditions => ["name = (?)", '終了']
+##        if tracker != nil && issue_status != nil
+##          if tracker.id == read_attribute(:tracker_id) && issue_status.id == read_attribute(:status_id)
+##            errors.add :fixed_version_id, :empty if read_attribute(:fixed_version_id).blank?
+##          end
+##        end
+##      end
+#    end
+#  end
+#end
+#Issue.send(:include, IssueExtensionsIssuePatch)