[#4391] Add the Deliverable title as an issue column.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user