Feature #24013 » Symbols_instead_of_strings_to_support_firebird_keywords.patch
app/models/issue.rb (date 1487076561000) | ||
---|---|---|
1593 | 1593 |
if p.priority_derived? |
1594 | 1594 |
# priority = highest priority of open children |
1595 | 1595 |
# priority is left unchanged if all children are closed and there's no default priority defined |
1596 |
if priority_position = p.children.open.joins(:priority).maximum("#{IssuePriority.table_name}.position") |
|
1596 |
if priority_position = p.children.open.joins(:priority).select(IssuePriority.arel_table[:position]. |
|
1597 |
maximum.as('maxi').to_sql).first[:maxi] |
|
1597 | 1598 |
p.priority = IssuePriority.find_by_position(priority_position) |
1598 | 1599 |
elsif default_priority = IssuePriority.default |
1599 | 1600 |
p.priority = default_priority |
app/models/member.rb (date 1487076561000) | ||
---|---|---|
34 | 34 |
# Sort by first role and principal |
35 | 35 |
scope :sorted, lambda { |
36 | 36 |
includes(:member_roles, :roles, :principal). |
37 |
reorder("#{Role.table_name}.position").
|
|
37 |
merge(Role.order(:position)).
|
|
38 | 38 |
order(Principal.fields_for_order_statement) |
39 | 39 |
} |
40 | 40 |
scope :sorted_by_project, lambda { |
app/helpers/my_helper.rb (date 1487076561000) | ||
---|---|---|
78 | 78 |
|
79 | 79 |
def issuesassignedtome_items |
80 | 80 |
Issue.visible.open. |
81 |
assigned_to(User.current). |
|
82 |
limit(10). |
|
83 |
includes(:status, :project, :tracker, :priority). |
|
84 |
references(:status, :project, :tracker, :priority). |
|
85 |
order("#{IssuePriority.table_name}.position DESC, #{Issue.table_name}.updated_on DESC")
|
|
81 |
assigned_to(User.current).
|
|
82 |
limit(10).
|
|
83 |
includes(:status, :project, :tracker, :priority).
|
|
84 |
references(:status, :project, :tracker, :priority).
|
|
85 |
merge(IssuePriority.reorder(:position => :desc)).merge(Issue.order(:updated_on => :desc))
|
|
86 | 86 |
end |
87 | 87 |
|
88 | 88 |
def issuesreportedbyme_items |
89 | 89 |
Issue.visible.open. |
90 |
where(:author_id => User.current.id). |
|
91 |
limit(10). |
|
92 |
includes(:status, :project, :tracker). |
|
93 |
references(:status, :project, :tracker). |
|
94 |
order("#{Issue.table_name}.updated_on DESC")
|
|
90 |
where(:author_id => User.current.id).
|
|
91 |
limit(10).
|
|
92 |
includes(:status, :project, :tracker).
|
|
93 |
references(:status, :project, :tracker).
|
|
94 |
order(:updated_on => :desc)
|
|
95 | 95 |
end |
96 | 96 |
|
97 | 97 |
def issueswatched_items |
... | ... | |
104 | 104 |
limit(10). |
105 | 105 |
includes(:project, :author). |
106 | 106 |
references(:project, :author). |
107 |
order("#{News.table_name}.created_on DESC").
|
|
107 |
order(:created_on => :desc).
|
|
108 | 108 |
to_a |
109 | 109 |
end |
110 | 110 |
|
... | ... | |
117 | 117 |
joins(:activity, :project). |
118 | 118 |
references(:issue => [:tracker, :status]). |
119 | 119 |
includes(:issue => [:tracker, :status]). |
120 |
order("#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Tracker.table_name}.position ASC, #{Issue.table_name}.id ASC").
|
|
120 |
order(:spent_on => :desc).merge(Project.order(:name)).merge(Tracker.order(:position)).merge(Issue.order(:id)).
|
|
121 | 121 |
to_a |
122 | 122 |
|
123 | 123 |
return entries, days |
app/controllers/versions_controller.rb (date 1487076561000) | ||
---|---|---|
50 | 50 |
includes(:project, :tracker). |
51 | 51 |
preload(:status, :priority, :fixed_version). |
52 | 52 |
where(:tracker_id => @selected_tracker_ids, :project_id => project_ids, :fixed_version_id => @versions.map(&:id)). |
53 |
order("#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id")
|
|
53 |
merge(Project.order(:lft)).merge(Tracker.order(:position)).merge(Issue.order(:id))
|
|
54 | 54 |
@issues_by_version = issues.group_by(&:fixed_version) |
55 | 55 |
end |
56 | 56 |
@versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].blank?} |
... | ... | |
67 | 67 |
@issues = @version.fixed_issues.visible. |
68 | 68 |
includes(:status, :tracker, :priority). |
69 | 69 |
preload(:project). |
70 |
reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").
|
|
70 |
merge(Tracker.order(:position)).merge(Issue.order(:id)).references(:tracker).
|
|
71 | 71 |
to_a |
72 | 72 |
} |
73 | 73 |
format.api |
lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb (date 1487076561000) | ||
---|---|---|
27 | 27 |
return if self.included_modules.include?(Redmine::Acts::Customizable::InstanceMethods) |
28 | 28 |
cattr_accessor :customizable_options |
29 | 29 |
self.customizable_options = options |
30 |
has_many :custom_values, lambda {includes(:custom_field).order("#{CustomField.table_name}.position")},
|
|
30 |
has_many :custom_values, lambda {includes(:custom_field).merge(CustomField.order(:position))},
|
|
31 | 31 |
:as => :customized, |
32 | 32 |
:inverse_of => :customized, |
33 | 33 |
:dependent => :delete_all, |