diff --git a/Rakefile b/Rakefile index cffd19f0c1..94042172bf 100644 --- a/Rakefile +++ b/Rakefile @@ -6,5 +6,4 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' - require 'tasks/rails' \ No newline at end of file diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index f6e0250faa..d8d63ac6e9 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -8,9 +8,11 @@ class MembersController < ApplicationController before_filter :authorize def new + logger.info(params.inspect) members = [] if params[:member] && request.post? attrs = params[:member].dup + logger.info("Attrs: #{attrs.inspect}") if (user_ids = attrs.delete(:user_ids)) user_ids.each do |user_id| members << Member.new(attrs.merge(:user_id => user_id)) diff --git a/app/models/issue.rb b/app/models/issue.rb index 002e5df02e..042fdf27ac 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -36,7 +36,7 @@ class Issue < ActiveRecord::Base acts_as_activity_provider :find_options => {:include => [:project, :author, :tracker]}, :author_key => :author_id - validates_presence_of :subject, :priority, :project, :tracker, :author, :status + validates_presence_of :subject, :project, :tracker, :author, :status #,:priority, validates_length_of :subject, :maximum => 255 validates_inclusion_of :done_ratio, :in => 0..100 validates_numericality_of :estimated_hours, :allow_nil => true @@ -57,7 +57,7 @@ def after_initialize if new_record? # set default values for new records only self.status ||= IssueStatus.default - self.priority ||= IssuePriority.default + # self.priority ||= IssuePriority.default end end @@ -134,10 +134,11 @@ def validate errors.add :start_date, :invalid end end - - def validate_on_create - errors.add :tracker_id, :invalid unless project.trackers.include?(tracker) - end + +# Commenting this since on bettermeans all projects will have same trackers + # def validate_on_create + # errors.add :tracker_id, :invalid unless project.trackers.include?(tracker) + # end def before_create # default assignment based on category diff --git a/app/views/mailer/_issue_text_html.rhtml b/app/views/mailer/_issue_text_html.rhtml index d0f2478127..bfdda0d5fa 100644 --- a/app/views/mailer/_issue_text_html.rhtml +++ b/app/views/mailer/_issue_text_html.rhtml @@ -3,7 +3,7 @@