Class: Redcukes::Issue

Inherits:
Redmine
  • Object
show all
Defined in:
lib/redcukes/issue.rb

Constant Summary collapse

@@default_filter =
{:status_id => '*'}

Class Method Summary collapse

Methods inherited from Redmine

configure, result_status, result_status=, search_filter, search_filter=

Class Method Details

.cucumber_featuresObject



6
7
8
9
# File 'lib/redcukes/issue.rb', line 6

def self.cucumber_features
  filter = @@default_filter.merge(self.search_filter)
  find(:all, :params => filter)
end

.update_status(id, status = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/redcukes/issue.rb', line 11

def self.update_status(id, status={})
  s = Issue.find(id)
  return if s.nil?
  if (status[:failed] != 0 || status[:errors] != 0)
    s.status_id = self.result_status[:failed]
  else
    s.status_id = self.result_status[:passed] if status[:passed] > 0
  end
  s.save
end