Patch #7443 » found-in-version-1.4.4-full.patch
| config/locales/fr.yml (copie de travail) | ||
|---|---|---|
|
field_due_date: Echéance
|
||
|
field_assigned_to: Assigné à
|
||
|
field_priority: Priorité
|
||
|
field_found_version: Détécté dans Version
|
||
|
field_fixed_version: Version cible
|
||
|
field_user: Utilisateur
|
||
|
field_role: Rôle
|
||
| config/locales/en.yml (copie de travail) | ||
|---|---|---|
|
field_due_date: Due date
|
||
|
field_assigned_to: Assignee
|
||
|
field_priority: Priority
|
||
|
field_found_version: Detected version
|
||
|
field_fixed_version: Target version
|
||
|
field_user: User
|
||
|
field_principal: Principal
|
||
| app/helpers/issues_helper.rb (copie de travail) | ||
|---|---|---|
|
value = format_date(detail.value.to_date) if detail.value
|
||
|
old_value = format_date(detail.old_value.to_date) if detail.old_value
|
||
|
when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'fixed_version_id'].include?(detail.prop_key)
|
||
|
when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'found_version_id', 'fixed_version_id'].include?(detail.prop_key)
|
||
|
value = find_name_by_reflection(field, detail.value)
|
||
|
old_value = find_name_by_reflection(field, detail.old_value)
|
||
| app/models/project.rb (copie de travail) | ||
|---|---|---|
|
new_issue = Issue.new
|
||
|
new_issue.copy_from(issue)
|
||
|
new_issue.project = self
|
||
|
# Reassign fixed_versions by name, since names are unique per
|
||
|
# Reassign versions by name, since names are unique per
|
||
|
# project and the versions for self are not yet saved
|
||
|
if issue.found_version
|
||
|
new_issue.found_version = self.versions.select {|v| v.name == issue.found_version.name}.first
|
||
|
end
|
||
|
if issue.fixed_version
|
||
|
new_issue.fixed_version = self.versions.select {|v| v.name == issue.fixed_version.name}.first
|
||
|
end
|
||
| app/models/query.rb (copie de travail) | ||
|---|---|---|
|
QueryColumn.new(:assigned_to, :sortable => lambda {User.fields_for_order_statement}, :groupable => true),
|
||
|
QueryColumn.new(:updated_on, :sortable => "#{Issue.table_name}.updated_on", :default_order => 'desc'),
|
||
|
QueryColumn.new(:category, :sortable => "#{IssueCategory.table_name}.name", :groupable => true),
|
||
|
QueryColumn.new(:found_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'desc', :groupable => true),
|
||
|
QueryColumn.new(:fixed_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'desc', :groupable => true),
|
||
|
QueryColumn.new(:start_date, :sortable => "#{Issue.table_name}.start_date"),
|
||
|
QueryColumn.new(:due_date, :sortable => "#{Issue.table_name}.due_date"),
|
||
| ... | ... | |
|
@available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } },
|
||
|
"tracker_id" => { :type => :list, :order => 2, :values => trackers.collect{|s| [s.name, s.id.to_s] } },
|
||
|
"priority_id" => { :type => :list, :order => 3, :values => IssuePriority.all.collect{|s| [s.name, s.id.to_s] } },
|
||
|
"subject" => { :type => :text, :order => 8 },
|
||
|
"created_on" => { :type => :date_past, :order => 9 },
|
||
|
"updated_on" => { :type => :date_past, :order => 10 },
|
||
|
"start_date" => { :type => :date, :order => 11 },
|
||
|
"due_date" => { :type => :date, :order => 12 },
|
||
|
"estimated_hours" => { :type => :float, :order => 13 },
|
||
|
"done_ratio" => { :type => :integer, :order => 14 }}
|
||
|
"subject" => { :type => :text, :order => 9 },
|
||
|
"created_on" => { :type => :date_past, :order => 10 },
|
||
|
"updated_on" => { :type => :date_past, :order => 11 },
|
||
|
"start_date" => { :type => :date, :order => 12 },
|
||
|
"due_date" => { :type => :date, :order => 13 },
|
||
|
"estimated_hours" => { :type => :integer, :order => 14 },
|
||
|
"done_ratio" => { :type => :integer, :order => 15 }}
|
||
|
principals = []
|
||
|
if project
|
||
| ... | ... | |
|
@available_filters["assigned_to_role"] = { :type => :list_optional, :order => 7, :values => role_values } unless role_values.empty?
|
||
|
if User.current.logged?
|
||
|
@available_filters["watcher_id"] = { :type => :list, :order => 15, :values => [["<< #{l(:label_me)} >>", "me"]] }
|
||
|
@available_filters["watcher_id"] = { :type => :list, :order => 16, :values => [["<< #{l(:label_me)} >>", "me"]] }
|
||
|
end
|
||
|
if project
|
||
| ... | ... | |
|
end
|
||
|
versions = project.shared_versions.all
|
||
|
unless versions.empty?
|
||
|
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
|
||
|
@available_filters["found_version_id"] = { :type => :list_optional, :order => 7, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
|
||
|
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 8, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
|
||
|
end
|
||
|
unless project.leaf?
|
||
|
subprojects = project.descendants.visible.all
|
||
| ... | ... | |
|
# global filters for cross project issue list
|
||
|
system_shared_versions = Version.visible.find_all_by_sharing('system')
|
||
|
unless system_shared_versions.empty?
|
||
|
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
|
||
|
@available_filters["found_version_id"] = { :type => :list_optional, :order => 7, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
|
||
|
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 8, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
|
||
|
end
|
||
|
add_custom_fields_filters(IssueCustomField.find(:all, :conditions => {:is_filter => true, :is_for_all => true}))
|
||
|
end
|
||
| app/models/mail_handler.rb (copie de travail) | ||
|---|---|---|
|
'priority_id' => (k = get_keyword(:priority)) && IssuePriority.named(k).first.try(:id),
|
||
|
'category_id' => (k = get_keyword(:category)) && issue.project.issue_categories.named(k).first.try(:id),
|
||
|
'assigned_to_id' => assigned_to.try(:id),
|
||
|
'found_version_id' => (k = get_keyword(:found_version, :override => true)) && issue.project.shared_versions.named(k).first.try(:id),
|
||
|
'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) && issue.project.shared_versions.named(k).first.try(:id),
|
||
|
'start_date' => get_keyword(:start_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
|
||
|
'due_date' => get_keyword(:due_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
|
||
| app/models/issue.rb (copie de travail) | ||
|---|---|---|
|
belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id'
|
||
|
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
||
|
belongs_to :assigned_to, :class_name => 'Principal', :foreign_key => 'assigned_to_id'
|
||
|
belongs_to :found_version, :class_name => 'Version', :foreign_key => 'found_version_id'
|
||
|
belongs_to :fixed_version, :class_name => 'Version', :foreign_key => 'fixed_version_id'
|
||
|
belongs_to :priority, :class_name => 'IssuePriority', :foreign_key => 'priority_id'
|
||
|
belongs_to :category, :class_name => 'IssueCategory', :foreign_key => 'category_id'
|
||
| ... | ... | |
|
attr_reader :current_journal
|
||
|
validates_presence_of :subject, :priority, :project, :tracker, :author, :status
|
||
|
validates_presence_of :found_version, :unless => Proc.new { |issue| issue.found_assignable_versions.empty? }
|
||
|
|
||
|
validates_length_of :subject, :maximum => 255
|
||
|
validates_inclusion_of :done_ratio, :in => 0..100
|
||
|
validates_numericality_of :estimated_hours, :allow_nil => true
|
||
| ... | ... | |
|
# reassign to the category with same name if any
|
||
|
new_category = issue.category.nil? ? nil : new_project.issue_categories.find_by_name(issue.category.name)
|
||
|
issue.category = new_category
|
||
|
# Keep the fixed_version if it's still valid in the new_project
|
||
|
# Keep the found version if it's still valid in the new_project
|
||
|
unless new_project.shared_versions.include?(issue.found_version)
|
||
|
issue.found_version = nil
|
||
|
end
|
||
|
# Keep the fixed version if it's still valid in the new_project
|
||
|
unless new_project.shared_versions.include?(issue.fixed_version)
|
||
|
issue.fixed_version = nil
|
||
|
end
|
||
| ... | ... | |
|
'category_id',
|
||
|
'assigned_to_id',
|
||
|
'priority_id',
|
||
|
'found_version_id',
|
||
|
'fixed_version_id',
|
||
|
'subject',
|
||
|
'description',
|
||
| ... | ... | |
|
errors.add :start_date, :invalid
|
||
|
end
|
||
|
if found_version
|
||
|
if !found_assignable_versions.include?(found_version)
|
||
|
errors.add :found_version_id, :inclusion
|
||
|
end
|
||
|
end
|
||
|
|
||
|
if fixed_version
|
||
|
if !assignable_versions.include?(fixed_version)
|
||
|
if !fixed_assignable_versions.include?(fixed_version)
|
||
|
errors.add :fixed_version_id, :inclusion
|
||
|
elsif reopened? && fixed_version.closed?
|
||
|
errors.add :base, I18n.t(:error_can_not_reopen_issue_on_closed_version)
|
||
| ... | ... | |
|
users.uniq.sort
|
||
|
end
|
||
|
# Versions that the issue can be assigned to
|
||
|
def assignable_versions
|
||
|
@assignable_versions ||= (project.shared_versions.open + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort
|
||
|
# Versions that the issue can be assigned as fixed to
|
||
|
def found_assignable_versions
|
||
|
@found_assignable_versions ||= project.shared_versions.locked
|
||
|
end
|
||
|
# Versions that the issue can be assigned as fixed to
|
||
|
def fixed_assignable_versions
|
||
|
@fixed_assignable_versions ||= (project.shared_versions.open + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort
|
||
|
end
|
||
|
# Returns true if this issue is blocked by another issue that is still open
|
||
|
def blocked?
|
||
|
!relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil?
|
||
| ... | ... | |
|
# Unassigns issues from +version+ if it's no longer shared with issue's project
|
||
|
def self.update_versions_from_sharing_change(version)
|
||
|
# Update issues assigned to the version
|
||
|
update_versions(["#{Issue.table_name}.found_version_id = ?", version.id])
|
||
|
update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id])
|
||
|
end
|
||
| ... | ... | |
|
:joins => Tracker.table_name)
|
||
|
end
|
||
|
def self.by_version(project)
|
||
|
def self.by_found_version(project)
|
||
|
count_and_group_by(:project => project,
|
||
|
:field => 'found_version_id',
|
||
|
:joins => Version.table_name)
|
||
|
end
|
||
|
def self.by_fixed_version(project)
|
||
|
count_and_group_by(:project => project,
|
||
|
:field => 'fixed_version_id',
|
||
|
:joins => Version.table_name)
|
||
|
end
|
||
| ... | ... | |
|
issue.save
|
||
|
end
|
||
|
end
|
||
|
# Only need to update issues with a found_version from
|
||
|
# a different project and that is not systemwide shared
|
||
|
Issue.all(:conditions => merge_conditions("#{Issue.table_name}.found_version_id IS NOT NULL" +
|
||
|
" AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" +
|
||
|
" AND #{Version.table_name}.sharing <> 'system'",
|
||
|
conditions),
|
||
|
:include => [:project, :found_version]
|
||
|
).each do |issue|
|
||
|
next if issue.project.nil? || issue.found_version.nil?
|
||
|
unless issue.project.shared_versions.include?(issue.found_version)
|
||
|
issue.init_journal(User.current)
|
||
|
issue.found_version = nil
|
||
|
issue.save
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|
||
|
# Callback on attachment deletion
|
||
| app/models/version.rb (copie de travail) | ||
|---|---|---|
|
include Redmine::SafeAttributes
|
||
|
after_update :update_issues_from_sharing_change
|
||
|
belongs_to :project
|
||
|
has_many :found_issues, :class_name => 'Issue', :foreign_key => 'found_version_id', :dependent => :nullify
|
||
|
has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id', :dependent => :nullify
|
||
|
acts_as_customizable
|
||
|
acts_as_attachable :view_permission => :view_files,
|
||
| ... | ... | |
|
named_scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}}
|
||
|
named_scope :open, :conditions => {:status => 'open'}
|
||
|
named_scope :locked, :conditions => {:status => 'locked'}
|
||
|
named_scope :closed, :conditions => {:status => 'closed'}
|
||
|
named_scope :visible, lambda {|*args| { :include => :project,
|
||
|
:conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }
|
||
| app/controllers/versions_controller.rb (copie de travail) | ||
|---|---|---|
|
verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed }
|
||
|
def destroy
|
||
|
if @version.fixed_issues.empty?
|
||
|
if @version.found_issues.empty? && @version.fixed_issues.empty?
|
||
|
@version.destroy
|
||
|
respond_to do |format|
|
||
|
format.html { redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project }
|
||
| app/controllers/issues_controller.rb (copie de travail) | ||
|---|---|---|
|
@issue_count = @query.issue_count
|
||
|
@issue_pages = Paginator.new self, @issue_count, @limit, params['page']
|
||
|
@offset ||= @issue_pages.current.offset
|
||
|
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
|
||
|
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :found_version, :fixed_version],
|
||
|
:order => sort_clause,
|
||
|
:offset => @offset,
|
||
|
:limit => @limit)
|
||
| app/controllers/reports_controller.rb (copie de travail) | ||
|---|---|---|
|
@subprojects = @project.descendants.visible
|
||
|
@issues_by_tracker = Issue.by_tracker(@project)
|
||
|
@issues_by_version = Issue.by_version(@project)
|
||
|
@issues_by_found_version = Issue.by_found_version(@project)
|
||
|
@issues_by_fixed_version = Issue.by_fixed_version(@project)
|
||
|
@issues_by_priority = Issue.by_priority(@project)
|
||
|
@issues_by_category = Issue.by_category(@project)
|
||
|
@issues_by_assigned_to = Issue.by_assigned_to(@project)
|
||
| ... | ... | |
|
@rows = @project.trackers
|
||
|
@data = Issue.by_tracker(@project)
|
||
|
@report_title = l(:field_tracker)
|
||
|
when "version"
|
||
|
when "found_version"
|
||
|
@field = "found_version_id"
|
||
|
@rows = @project.shared_versions.sort
|
||
|
@data = Issue.by_found_version(@project)
|
||
|
@report_title = l(:field_found_version)
|
||
|
when "fixed_version"
|
||
|
@field = "fixed_version_id"
|
||
|
@rows = @project.shared_versions.sort
|
||
|
@data = Issue.by_version(@project)
|
||
|
@report_title = l(:field_version)
|
||
|
@data = Issue.by_fixed_version(@project)
|
||
|
@report_title = l(:field_fixed_version)
|
||
|
when "priority"
|
||
|
@field = "priority_id"
|
||
|
@rows = IssuePriority.all
|
||
| app/controllers/issue_moves_controller.rb (copie de travail) | ||
|---|---|---|
|
@target_project ||= @project
|
||
|
@trackers = @target_project.trackers
|
||
|
@available_statuses = Workflow.available_statuses(@project)
|
||
|
@found_versions = @target_project.shared_versions.locked
|
||
|
@notes = params[:notes]
|
||
|
@notes ||= ''
|
||
|
end
|
||
|
def extract_changed_attributes_for_move(params)
|
||
|
changed_attributes = {}
|
||
|
[:assigned_to_id, :status_id, :start_date, :due_date, :priority_id].each do |valid_attribute|
|
||
|
[:assigned_to_id, :status_id, :found_version_id, :start_date, :due_date, :priority_id].each do |valid_attribute|
|
||
|
unless params[valid_attribute].blank?
|
||
|
changed_attributes[valid_attribute] = (params[valid_attribute] == 'none' ? nil : params[valid_attribute])
|
||
|
end
|
||
| app/views/issues/show.html.erb (copie de travail) | ||
|---|---|---|
|
<% end %>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
|
||
|
<th class="fixed-version"><%=l(:field_found_version)%>:</th><td class="fixed-version"><%= @issue.found_version ? link_to_version(@issue.found_version) : "-" %></td>
|
||
|
<% if @issue.estimated_hours %>
|
||
|
<th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
|
||
|
<% end %>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
|
||
|
</tr>
|
||
|
<%= render_custom_fields_rows(@issue) %>
|
||
|
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||
|
</table>
|
||
| app/views/issues/_attributes.html.erb (copie de travail) | ||
|---|---|---|
|
:title => l(:label_issue_category_new),
|
||
|
:tabindex => 199) if authorize_for('issue_categories', 'new') %></p>
|
||
|
<% end %>
|
||
|
<% unless @issue.assignable_versions.empty? %>
|
||
|
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true %>
|
||
|
<% unless @issue.found_assignable_versions.empty? %>
|
||
|
<p><%= f.select :found_version_id, version_options_for_select(@issue.found_assignable_versions, @issue.found_version), :include_blank => true, :required => true %></p>
|
||
|
<% end %>
|
||
|
<% unless @issue.fixed_assignable_versions.empty? %>
|
||
|
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.fixed_assignable_versions, @issue.fixed_version), :include_blank => true %>
|
||
|
<%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||
|
l(:label_version_new),
|
||
|
'version[name]',
|
||
| app/views/issues/index.api.rsb (copie de travail) | ||
|---|---|---|
|
api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
|
||
|
api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
|
||
|
api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
|
||
|
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
|
||
|
api.found_version(:id => issue.found_version_id, :name => issue.found_version.name) unless issue.found_version.nil?
|
||
|
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
|
||
|
api.parent(:id => issue.parent_id) unless issue.parent.nil?
|
||
|
api.subject issue.subject
|
||
| app/views/issues/bulk_edit.html.erb (copie de travail) | ||
|---|---|---|
|
<% #TODO: allow editing versions when multiple projects %>
|
||
|
<% if @project %>
|
||
|
<p>
|
||
|
<label for='issue_found_version_id'><%= l(:field_found_version) %></label>
|
||
|
<%= select_tag('issue[found_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
||
|
content_tag('option', l(:label_none), :value => 'none') +
|
||
|
version_options_for_select(@project.shared_versions.locked)) %>
|
||
|
</p>
|
||
|
<p>
|
||
|
<label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
|
||
|
<%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
||
|
content_tag('option', l(:label_none), :value => 'none') +
|
||
|
version_options_for_select(@project.shared_versions.open.sort)) %>
|
||
|
version_options_for_select(@project.shared_versions.open)) %>
|
||
|
</p>
|
||
|
<% end %>
|
||
| app/views/issues/show.api.rsb (copie de travail) | ||
|---|---|---|
|
api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
|
||
|
api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
|
||
|
api.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil?
|
||
|
api.found_version(:id => @issue.found_version_id, :name => @issue.found_version.name) unless @issue.found_version.nil?
|
||
|
api.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil?
|
||
|
api.parent(:id => @issue.parent_id) unless @issue.parent.nil?
|
||
| app/views/issues/_form_update.html.erb (copie de travail) | ||
|---|---|---|
|
<% if Issue.use_field_for_done_ratio? %>
|
||
|
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
|
||
|
<% end %>
|
||
|
<% unless @issue.assignable_versions.empty? %>
|
||
|
<p><%= f.select :fixed_version_id, (@issue.assignable_versions.collect {|v| [v.name, v.id]}), :include_blank => true %></p>
|
||
|
+<% unless @issue.fixed_assignable_versions.empty? %>
|
||
|
+<p><%= f.select :fixed_version_id, (@issue.fixed_assignable_versions.collect {|v| [v.name, v.id]}), :include_blank => true %></p>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
</div>
|
||
| app/views/issue_moves/new.html.erb (copie de travail) | ||
|---|---|---|
|
<label for='status_id'><%= l(:field_status) %></label>
|
||
|
<%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
|
||
|
</p>
|
||
|
<% if !@found_versions.empty? %>
|
||
|
<p>
|
||
|
<label for="new_found_version_id"><%=l(:field_found_version) %></label>
|
||
|
<%= select_tag('new_found_version_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@found_versions, :id, :name)) %>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
<p>
|
||
|
<label for='priority_id'><%= l(:field_priority) %></label>
|
||
| app/views/reports/issue_report.html.erb (copie de travail) | ||
|---|---|---|
|
</div>
|
||
|
<div class="splitcontentright">
|
||
|
<h3><%=l(:field_version)%> <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'version' %></h3>
|
||
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %>
|
||
|
<h3><%=l(:field_found_version)%> <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'found_version' %></h3>
|
||
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_found_version, :field_name => "found_version_id", :rows => @versions } %>
|
||
|
<br />
|
||
|
<h3><%=l(:field_fixed_version)%> <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'fixed_version' %></h3>
|
||
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_fixed_version, :field_name => "fixed_version_id", :rows => @versions } %>
|
||
|
<br />
|
||
|
<% if @project.children.any? %>
|
||
|
<h3><%=l(:field_subproject)%> <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'subproject' %></h3>
|
||
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_subproject, :field_name => "project_id", :rows => @subprojects } %>
|
||
| app/views/mailer/_issue.html.erb (copie de travail) | ||
|---|---|---|
|
<li><%=l(:field_priority)%>: <%=h issue.priority %></li>
|
||
|
<li><%=l(:field_assigned_to)%>: <%=h issue.assigned_to %></li>
|
||
|
<li><%=l(:field_category)%>: <%=h issue.category %></li>
|
||
|
<li><%=l(:field_found_version)%>: <%= issue.found_version %> </li>
|
||
|
<li><%=l(:field_fixed_version)%>: <%=h issue.fixed_version %></li>
|
||
|
<% issue.custom_field_values.each do |c| %>
|
||
|
<li><%=h c.custom_field.name %>: <%=h show_value(c) %></li>
|
||
| app/views/mailer/_issue.text.erb (copie de travail) | ||
|---|---|---|
|
<%=l(:field_priority)%>: <%= issue.priority %>
|
||
|
<%=l(:field_assigned_to)%>: <%= issue.assigned_to %>
|
||
|
<%=l(:field_category)%>: <%= issue.category %>
|
||
|
<%=l(:field_found_version)%>: <%= issue.found_version %>
|
||
|
<%=l(:field_fixed_version)%>: <%= issue.fixed_version %>
|
||
|
<% issue.custom_field_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %>
|
||
|
<% end %>
|
||
|
Index: db/migrate/20120328183300_add_found_version.rb
|
||
|
===================================================================
|
||
|
++ db/migrate/20120328183300_add_found_version.rb 2011-02-10 17:13:06.393825200 -0700
|
||
| ... | ... | |
|
class AddFoundVersion < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
add_column :issues, :found_version_id, :integer
|
||
|
add_index :issues, :found_version_id
|
||
|
end
|
||
|
def self.down
|
||
|
remove_index :issues, :found_version_id
|
||
|
remove_column :issues, :found_version_id
|
||
|
end
|
||
|
end
|
||