]> source.dussan.org Git - redmine.git/commitdiff
Propose system activities only when reassigning time entries (#13783).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 1 May 2013 16:43:51 +0000 (16:43 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 1 May 2013 16:43:51 +0000 (16:43 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11762 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/enumerations_controller.rb
app/models/enumeration.rb

index 4e5475becc35cfe1a85a75735af20affd4966a9f..125e87cff86422f7e7bb4ca6f1ec8d6ef67b00c0 100644 (file)
@@ -77,7 +77,7 @@ class EnumerationsController < ApplicationController
         return
       end
     end
-    @enumerations = @enumeration.class.all - [@enumeration]
+    @enumerations = @enumeration.class.system.all - [@enumeration]
   end
 
   private
index 1946735ec8baf5bd8e33e9aac9c4311cabad3b37..7e8bf5a81cd922e7aac6ef371275ab27986b80d0 100644 (file)
@@ -38,6 +38,7 @@ class Enumeration < ActiveRecord::Base
   scope :shared, lambda { where(:project_id => nil) }
   scope :sorted, lambda { order("#{table_name}.position ASC") }
   scope :active, lambda { where(:active => true) }
+  scope :system, lambda { where(:project_id => nil) }
   scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)}
 
   def self.default