OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/models/sprint.rb

31 lines
685 B

15 years ago
class Sprint < Version
unloadable
15 years ago
named_scope :open_sprints, lambda { |project|
{
:order => 'start_date ASC, effective_date ASC',
:conditions => [ "status = 'open' and project_id = ?", project.id ]
}
}
def stories
return Story.sprint_backlog(self)
end
def points
return stories.sum('story_points')
end
15 years ago
def wiki_page
if ! project.wiki
return ''
end
if wiki_page_title.nil? || wiki_page_title.blank?
self.update_attribute(:wiki_page_title, name.gsub(/\s+/, '_').gsub(/[^_a-zA-Z0-9]/, ''))
end
return wiki_page_title
end
15 years ago
end