annotate app/helpers/gantt_helper.rb @ 36:de76cd3e8c8e cc-branches

* Probably abortive experiments in extracting the branch from Hg
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 20 Oct 2010 10:07:29 +0100
parents 40f7cfd4df19
children 94944d00e43c
rev   line source
chris@22 1 # redMine - project management software
chris@22 2 # Copyright (C) 2006 Jean-Philippe Lang
chris@22 3 #
chris@22 4 # This program is free software; you can redistribute it and/or
chris@22 5 # modify it under the terms of the GNU General Public License
chris@22 6 # as published by the Free Software Foundation; either version 2
chris@22 7 # of the License, or (at your option) any later version.
chris@22 8 #
chris@22 9 # This program is distributed in the hope that it will be useful,
chris@22 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
chris@22 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
chris@22 12 # GNU General Public License for more details.
chris@22 13 #
chris@22 14 # You should have received a copy of the GNU General Public License
chris@22 15 # along with this program; if not, write to the Free Software
chris@22 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
chris@22 17
chris@22 18 module GanttHelper
chris@22 19 def number_of_issues_on_versions(gantt)
chris@22 20 versions = gantt.events.collect {|event| (event.is_a? Version) ? event : nil}.compact
chris@22 21
chris@22 22 versions.sum {|v| v.fixed_issues.for_gantt.with_query(@query).count}
chris@22 23 end
chris@22 24 end