Project

General

Profile

Patch #1666 » only_show_incomplete_target_versions.patch

Anonymous, 2008-07-21 03:37

View differences:

app/models/version.rb Mon Jun 02 08:24:52 2008 +1000
46 46
  
47 47
  # Returns true if the version is completed: due date reached and no open issues
48 48
  def completed?
49
    effective_date && (effective_date <= Date.today) && (open_issues_count == 0)
49
    effective_date && (effective_date <= Date.today) && (open_issues_count == 0) && (closed_issues_count > 0)
50 50
  end
51 51
  
52 52
  def completed_pourcent
app/views/issues/_form.rhtml Mon Jun 02 08:24:52 2008 +1000 → app/views/issues/_form.rhtml Tue Jun 03 10:16:18 2008 +1000
30 30
                     {:controller => 'projects', :action => 'add_issue_category', :id => @project},
31 31
                     :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p>
32 32
<%= content_tag('p', f.select(:fixed_version_id, 
33
                              (@project.versions.sort.collect {|v| [v.name, v.id]}),
33
                              (@project.versions.sort.select {|v| !v.completed? || v.id == @issue.fixed_version.id}.collect {|v| [v.name, v.id]}),
34 34
                              { :include_blank => true })) unless @project.versions.empty? %>
35 35
</div>
36 36

  
app/views/issues/_form_update.rhtml Mon Jun 02 08:24:52 2008 +1000 → app/views/issues/_form_update.rhtml Tue Jun 03 10:16:03 2008 +1000
5 5
<div class="splitcontentright">
6 6
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
7 7
<%= content_tag('p', f.select(:fixed_version_id, 
8
                          (@project.versions.sort.collect {|v| [v.name, v.id]}),
8
                          (@project.versions.sort.select {|v| !v.completed? || v.id == @issue.fixed_version.id}.collect {|v| [v.name, v.id]}),
9 9
                          { :include_blank => true })) unless @project.versions.empty? %>
10 10
</div>
(2-2/3)