--- loader_helper.rb 2010-04-06 19:09:30.000000000 +0200 +++ loader_helper2.rb 2010-04-22 08:16:05.600313384 +0200 @@ -7,6 +7,7 @@ # # # History: 04-Jan-2008 (ADH): Created. # # Feb 2009 (SJS): Hacked into plugin for redmine # +# Apr 2010 (XE): Updated category management # ######################################################################## module LoaderHelper @@ -50,8 +51,10 @@ # First populate the selection box with all the existing categories from this project existingCategoryList = IssueCategory.find :all, :conditions => { :project_id => project } - output = " " + # Empty entry + output << "" + output << " " existingCategoryList.each do | category_info | if ( category_info.to_s == requestedCategory ) output << "" @@ -62,20 +65,23 @@ output << "" + # + # We comment those lines because we dont want new categories based on imported tasks + # Now add any new categories that we found in the project file - output << " " + #output << " " - allNewCategories.each do | category_name | - if ( not existingCategoryList.include?(category_name) ) - if ( category_name == requestedCategory ) - output << "" - else - output << "" - end - end - end + #allNewCategories.each do | category_name | + # if ( not existingCategoryList.include?(category_name) ) + # if ( category_name == requestedCategory ) + # output << "" + # else + # output << "" + # end + # end + #end - output << "" + #output << "" output << "" @@ -115,4 +121,4 @@ end -end \ No newline at end of file +end