Patch #1666 » only_show_incomplete_target_versions.patch
| app/models/version.rb Mon Jun 02 08:24:52 2008 +1000 | ||
|---|---|---|
|
|
||
|
# Returns true if the version is completed: due date reached and no open issues
|
||
|
def completed?
|
||
|
effective_date && (effective_date <= Date.today) && (open_issues_count == 0)
|
||
|
effective_date && (effective_date <= Date.today) && (open_issues_count == 0) && (closed_issues_count > 0)
|
||
|
end
|
||
|
|
||
|
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 | ||
|---|---|---|
|
{:controller => 'projects', :action => 'add_issue_category', :id => @project},
|
||
|
:class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p>
|
||
|
<%= content_tag('p', f.select(:fixed_version_id,
|
||
|
(@project.versions.sort.collect {|v| [v.name, v.id]}),
|
||
|
(@project.versions.sort.select {|v| !v.completed? || v.id == @issue.fixed_version.id}.collect {|v| [v.name, v.id]}),
|
||
|
{ :include_blank => true })) unless @project.versions.empty? %>
|
||
|
</div>
|
||
| 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 | ||
|---|---|---|
|
<div class="splitcontentright">
|
||
|
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
|
||
|
<%= content_tag('p', f.select(:fixed_version_id,
|
||
|
(@project.versions.sort.collect {|v| [v.name, v.id]}),
|
||
|
(@project.versions.sort.select {|v| !v.completed? || v.id == @issue.fixed_version.id}.collect {|v| [v.name, v.id]}),
|
||
|
{ :include_blank => true })) unless @project.versions.empty? %>
|
||
|
</div>
|
||