Skip to content

Commit

Permalink
[api] fix parsing of changed issues bugzilla answer
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Jan 20, 2012
1 parent ebd2991 commit 493121c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/api/app/models/issue_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,19 @@ def update_issues()
# guarantee a complete search)
update_time_stamp = Time.at(Time.now.to_f - 5)

result = bugzilla_server.search(:last_change_time => self.issues_updated)
ids = result["bugs"].map{ |x| x.r["id"].to_s }
if kind == "bugzilla"
result = bugzilla_server.search(:last_change_time => self.issues_updated)
ids = result["bugs"].map{ |x| x["id"].to_i }

ret = private_fetch_issues(ids)
ret = private_fetch_issues(ids)

self.issues_updated = update_time_stamp
self.save!
self.issues_updated = update_time_stamp
self.save!

return true
return true
end

return false
end

def fetch_issues(issues=nil)
Expand Down

0 comments on commit 493121c

Please sign in to comment.