now it is possible to define to what a chainable applies for - this is used e.g. to separate filters for entries and filters for issues

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1273 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 15 years ago
parent de8d8ac289
commit 2744f7bd1f
  1. 3
      app/models/cost_query/chainable.rb
  2. 1
      app/models/cost_query/filter/assigned_to_id.rb
  3. 1
      app/models/cost_query/filter/category_id.rb
  4. 1
      app/models/cost_query/filter/due_date.rb
  5. 1
      app/models/cost_query/filter/fixed_version_id.rb
  6. 1
      app/models/cost_query/filter/priority_id.rb
  7. 1
      app/models/cost_query/filter/start_date.rb
  8. 1
      app/models/cost_query/filter/status_id.rb
  9. 1
      app/models/cost_query/filter/subject.rb
  10. 1
      app/models/cost_query/filter/tracker_id.rb

@ -5,6 +5,9 @@ class CostQuery < ActiveRecord::Base
include CostQuery::QueryUtils
extend CostQuery::InheritedAttribute
inherited_attribute :applies_for,
:default => :label_entry #this attr. should point to a symbol useable for translations
def self.accepts_property(*list)
CostQuery.accepted_properties.push(*list.map(&:to_s))
end

@ -1,6 +1,7 @@
class CostQuery::Filter::AssignedToId < CostQuery::Filter::Base
null_operators
join_table Issue
applies_for :label_issue
label :field_assigned_to
def self.available_values

@ -1,6 +1,7 @@
class CostQuery::Filter::CategoryId < CostQuery::Filter::Base
null_operators
join_table Issue
applies_for :label_issue
label :field_category
def self.available_values

@ -1,5 +1,6 @@
class CostQuery::Filter::DueDate < CostQuery::Filter::Base
date_operators
join_table Issue
applies_for :label_issue
label :field_due_date
end

@ -1,6 +1,7 @@
class CostQuery::Filter::FixedVersionId < CostQuery::Filter::Base
null_operators
join_table Issue
applies_for :label_issue
label :field_fixed_version
def self.available_values(param={})

@ -1,5 +1,6 @@
class CostQuery::Filter::PriorityId < CostQuery::Filter::Base
join_table Issue
applies_for :label_issue
label :field_priority
def self.available_values

@ -1,5 +1,6 @@
class CostQuery::Filter::StartDate < CostQuery::Filter::Base
date_operators
join_table Issue
applies_for :label_issue
label :field_start_date
end

@ -1,6 +1,7 @@
class CostQuery::Filter::StatusId < CostQuery::Filter::Base
available_operators 'c', 'o'
join_table Issue, IssueStatus => [Issue, :status]
applies_for :label_issue
label :field_status
def self.available_values

@ -1,4 +1,5 @@
class CostQuery::Filter::Subject < CostQuery::Filter::Base
join_table Issue
applies_for :label_issue
label :field_subject
end

@ -1,5 +1,6 @@
class CostQuery::Filter::TrackerId < CostQuery::Filter::Base
join_table Issue
applies_for :label_issue
label :field_tracker
def self.available_values

Loading…
Cancel
Save