Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Incorporated fix for project-specific category and version search

from mschibata.
  • Loading branch information...
commit c65c22208cdeb448509104b8bd35fbba78956f51 1 parent 8383ed4
Leo Hourvitz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/importer_controller.rb
View
4 app/controllers/importer_controller.rb
@@ -142,7 +142,7 @@ def user_id_for_login!(login)
# will create a new version and save it when it doesn't exist yet.
def version_id_for_name!(project,name,add_versions)
if !@version_id_by_name.has_key?(name)
- version = Version.find_by_name(name)
+ version = Version.find_by_project_id_and_name(project.id, name)
if !version
if name && (name.length > 0) && add_versions
version = project.versions.build(:name=>name)
@@ -235,7 +235,7 @@ def result
author = attrs_map["author"] ? user_for_login!(row[attrs_map["author"]]) : User.current
priority = Enumeration.find_by_name(row[attrs_map["priority"]])
category_name = row[attrs_map["category"]]
- category = IssueCategory.find_by_name(category_name)
+ category = IssueCategory.find_by_project_id_and_name(project.id, category_name)
if (!category) && category_name && category_name.length > 0 && add_categories
category = project.issue_categories.build(:name => category_name)
category.save

1 comment on commit c65c222

@huonanwang

dddd

Please sign in to comment.
Something went wrong with that request. Please try again.