[#4391] Add the Deliverable title as an issue column.

This commit is contained in:
Eric Davis
2010-08-12 10:36:01 -07:00
parent 8906639273
commit b83696f49a
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -57,4 +57,4 @@ en:
text_deliverable_details_legend: "Deliverable Details"
text_save_contract: "Save Contract"
enumeration_payment_term: "Payment Terms"
field_deliverable_title: "Deliverable"
+4
View File
@@ -65,6 +65,10 @@ Dispatcher.to_prepare :redmine_contracts do
Project.send(:include, RedmineContracts::Patches::ProjectPatch)
require_dependency 'issue'
Issue.send(:include, RedmineContracts::Patches::IssuePatch)
unless Query.available_columns.collect(&:name).include?(:deliverable_title)
Query.add_available_column(QueryColumn.new(:deliverable_title, :sortable => "#{Deliverable.table_name}.title"))
end
end
require 'redmine_contracts/hooks/view_layouts_base_html_head_hook'
@@ -8,6 +8,8 @@ module RedmineContracts
base.class_eval do
unloadable
belongs_to :deliverable
delegate :title, :to => :deliverable, :prefix => true, :allow_nil => true
end
end