diff --git a/plugins/ekanban/app/models/kanban.rb b/plugins/ekanban/app/models/kanban.rb index 5e294a170..c6de06035 100644 --- a/plugins/ekanban/app/models/kanban.rb +++ b/plugins/ekanban/app/models/kanban.rb @@ -145,6 +145,12 @@ def wip KanbanCard.open().by_user(self).in_progress().size end + def wip_limit + id = CustomField.find_by_name("WIP limit").id + v = self.custom_value_for(id) + v.nil? ? 3 : v.value.to_i + end + end class Principal < ActiveRecord::Base diff --git a/plugins/ekanban/db/migrate/011_add_wip_col_to_user.rb b/plugins/ekanban/db/migrate/011_add_wip_col_to_user.rb deleted file mode 100644 index dba490a5c..000000000 --- a/plugins/ekanban/db/migrate/011_add_wip_col_to_user.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddWipColToUser < ActiveRecord::Migration - def change - #table "user" - add_column :users, :wip_limit, :integer, :default=>2 - end -end