Skip to content

Commit

Permalink
[api] Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Jul 21, 2015
1 parent 5492fe9 commit e3f8845
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/api/app/models/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,6 @@ class NotFoundError < APIException

scope :stateless, -> { where(:state => nil) }

def self.get_by_name_and_tracker(name, issue_tracker_name, force_update=nil)
issue_tracker = IssueTracker.find_by_name(issue_tracker_name)
unless issue_tracker
raise IssueTracker::NotFoundError.new("Error: Issue Tracker '#{issue_tracker_name}' not found.")
end

issue = issue_tracker.issues.find_by_name name
unless issue
raise NotFoundError.new("Error: Issue '#{name}' not found.")
end

if force_update
issue.fetch_updates
return issue_tracker.issues.find_by_name name
end

return issue
end

def self.find_or_create_by_name_and_tracker( name, issue_tracker_name, force_update=nil )
return self.find_by_name_and_tracker( name, issue_tracker_name, force_update, true )
end
Expand Down

0 comments on commit e3f8845

Please sign in to comment.