Index: app/models/query.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/models/query.rb (date 1487680368000)
+++ app/models/query.rb (date 1487680385000)
@@ -716,7 +716,7 @@
arg = arg.keys.sort.collect {|k| arg[k]}
end
if arg
- c = arg.select {|k,o| !k.to_s.blank?}.slice(0,3).collect {|k,o| [k.to_s, (o == 'desc' || o == false) ? 'desc' : 'asc']}
+ c = arg.select { |k, o| !k.to_s.blank? }.slice(0, 3).collect { |k, o| [k.to_s, o.to_s.empty? ? 'asc' : o.to_s] }
end
write_attribute(:sort_criteria, c)
end
@@ -984,7 +984,7 @@
" SELECT customized_id FROM #{CustomValue.table_name}" +
" WHERE customized_type='#{target_class}' AND custom_field_id=#{chained_custom_field_id}" +
" AND #{sql_for_field(field, operator, value, CustomValue.table_name, 'value')}))"
-
+
end
def sql_for_custom_field_attribute(field, operator, value, custom_field_id, attribute)
Index: config/locales/ar.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/ar.yml (date 1487680368000)
+++ config/locales/ar.yml (date 1487680385000)
@@ -1229,3 +1229,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/az.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/az.yml (date 1487680368000)
+++ config/locales/az.yml (date 1487680385000)
@@ -1324,3 +1324,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/bg.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/bg.yml (date 1487680368000)
+++ config/locales/bg.yml (date 1487680385000)
@@ -1213,3 +1213,5 @@
description_date_from: Въведете начална дата
description_date_to: Въведете крайна дата
text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.'
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/bs.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/bs.yml (date 1487680368000)
+++ config/locales/bs.yml (date 1487680385000)
@@ -1242,3 +1242,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/ca.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/ca.yml (date 1487680368000)
+++ config/locales/ca.yml (date 1487680385000)
@@ -1219,3 +1219,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/cs.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/cs.yml (date 1487680368000)
+++ config/locales/cs.yml (date 1487680385000)
@@ -1228,3 +1228,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/da.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/da.yml (date 1487680368000)
+++ config/locales/da.yml (date 1487680385000)
@@ -1246,3 +1246,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/de.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/de.yml (date 1487680368000)
+++ config/locales/de.yml (date 1487680385000)
@@ -1231,3 +1231,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/el.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/el.yml (date 1487680368000)
+++ config/locales/el.yml (date 1487680385000)
@@ -1229,3 +1229,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/en.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/en.yml (date 1487680368000)
+++ config/locales/en.yml (date 1487680385000)
@@ -898,6 +898,8 @@
label_sort: Sort
label_ascending: Ascending
label_descending: Descending
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
label_date_from_to: From %{start} to %{end}
label_wiki_content_added: Wiki page added
label_wiki_content_updated: Wiki page updated
Index: config/locales/es.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/es.yml (date 1487680368000)
+++ config/locales/es.yml (date 1487680385000)
@@ -1257,3 +1257,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/et.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/et.yml (date 1487680368000)
+++ config/locales/et.yml (date 1487680385000)
@@ -1234,3 +1234,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/eu.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/eu.yml (date 1487680368000)
+++ config/locales/eu.yml (date 1487680385000)
@@ -1230,3 +1230,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/fa.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/fa.yml (date 1487680368000)
+++ config/locales/fa.yml (date 1487680385000)
@@ -1230,3 +1230,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top\
Index: config/locales/fi.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/fi.yml (date 1487680368000)
+++ config/locales/fi.yml (date 1487680385000)
@@ -1250,3 +1250,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/fr.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/fr.yml (date 1487680368000)
+++ config/locales/fr.yml (date 1487680385000)
@@ -1230,3 +1230,5 @@
label_no_preview: No preview available
label_user_mail_option_only_assigned: Only for things I watch or I am assigned to
label_user_mail_option_only_owner: Only for things I watch or I am the owner of
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/gl.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/gl.yml (date 1487680368000)
+++ config/locales/gl.yml (date 1487680385000)
@@ -1237,3 +1237,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/he.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/he.yml (date 1487680368000)
+++ config/locales/he.yml (date 1487680385000)
@@ -1234,3 +1234,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/hr.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/hr.yml (date 1487680368000)
+++ config/locales/hr.yml (date 1487680385000)
@@ -1228,3 +1228,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/hu.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/hu.yml (date 1487680368000)
+++ config/locales/hu.yml (date 1487680385000)
@@ -1248,3 +1248,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/id.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/id.yml (date 1487680368000)
+++ config/locales/id.yml (date 1487680385000)
@@ -1233,3 +1233,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/it.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/it.yml (date 1487680368000)
+++ config/locales/it.yml (date 1487680385000)
@@ -1224,3 +1224,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/ja.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/ja.yml (date 1487680368000)
+++ config/locales/ja.yml (date 1487680385000)
@@ -1236,3 +1236,5 @@
field_updated_by: 更新者
field_last_updated_by: 最終更新者
field_full_width_layout: ワイド表示
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/ko.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/ko.yml (date 1487680368000)
+++ config/locales/ko.yml (date 1487680385000)
@@ -1268,3 +1268,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/lt.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/lt.yml (date 1487680368000)
+++ config/locales/lt.yml (date 1487680385000)
@@ -1218,3 +1218,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/lv.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/lv.yml (date 1487680368000)
+++ config/locales/lv.yml (date 1487680385000)
@@ -1223,3 +1223,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/mk.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/mk.yml (date 1487680368000)
+++ config/locales/mk.yml (date 1487680385000)
@@ -1229,3 +1229,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/mn.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/mn.yml (date 1487680368000)
+++ config/locales/mn.yml (date 1487680385000)
@@ -1230,3 +1230,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/nl.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/nl.yml (date 1487680368000)
+++ config/locales/nl.yml (date 1487680385000)
@@ -1204,3 +1204,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/no.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/no.yml (date 1487680368000)
+++ config/locales/no.yml (date 1487680385000)
@@ -1219,3 +1219,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/pl.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/pl.yml (date 1487680368000)
+++ config/locales/pl.yml (date 1487680385000)
@@ -1244,3 +1244,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
\ No newline at end of file
Index: config/locales/pt.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/pt.yml (date 1487680368000)
+++ config/locales/pt.yml (date 1487680385000)
@@ -1232,3 +1232,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/ro.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/ro.yml (date 1487680368000)
+++ config/locales/ro.yml (date 1487680385000)
@@ -13,8 +13,7 @@
month_names: [~, Ianuarie, Februarie, Martie, Aprilie, Mai, Iunie, Iulie, August, Septembrie, Octombrie, Noiembrie, Decembrie]
abbr_month_names: [~, Ian, Feb, Mar, Apr, Mai, Iun, Iul, Aug, Sep, Oct, Noi, Dec]
order:
- - :day
- - :month
+ - :day- :month
- :year
time:
@@ -1224,3 +1223,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/ru.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/ru.yml (date 1487680368000)
+++ config/locales/ru.yml (date 1487680385000)
@@ -1331,3 +1331,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: По возрастанию с пустыми значениями в конце
+ label_descending_nulls_first: По убыванию с пустыми значениями в начале
Index: config/locales/sk.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/sk.yml (date 1487680368000)
+++ config/locales/sk.yml (date 1487680385000)
@@ -1219,3 +1219,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/sl.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/sl.yml (date 1487680368000)
+++ config/locales/sl.yml (date 1487680385000)
@@ -1229,3 +1229,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/sq.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/sq.yml (date 1487680368000)
+++ config/locales/sq.yml (date 1487680385000)
@@ -1225,3 +1225,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/sr.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/sr.yml (date 1487680368000)
+++ config/locales/sr.yml (date 1487680385000)
@@ -1230,3 +1230,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/sv.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/sv.yml (date 1487680368000)
+++ config/locales/sv.yml (date 1487680385000)
@@ -1262,3 +1262,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/th.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/th.yml (date 1487680368000)
+++ config/locales/th.yml (date 1487680385000)
@@ -1226,3 +1226,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/tr.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/tr.yml (date 1487680368000)
+++ config/locales/tr.yml (date 1487680385000)
@@ -1237,3 +1237,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/uk.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/uk.yml (date 1487680368000)
+++ config/locales/uk.yml (date 1487680385000)
@@ -1224,3 +1224,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/vi.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/vi.yml (date 1487680368000)
+++ config/locales/vi.yml (date 1487680385000)
@@ -1282,3 +1282,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/zh.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/zh.yml (date 1487680368000)
+++ config/locales/zh.yml (date 1487680385000)
@@ -1222,3 +1222,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: lib/redmine/database.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/redmine/database.rb (date 1487680368000)
+++ lib/redmine/database.rb (date 1487680385000)
@@ -49,6 +49,14 @@
(ActiveRecord::Base.connection.adapter_name =~ /mysql/i).present?
end
+ def sqlite3?
+ (ActiveRecord::Base.connection.adapter_name =~ /sqlite/i).present?
+ end
+
+ def sqlserver?
+ (ActiveRecord::Base.connection.adapter_name =~ /sqlserver/i).present?
+ end
+
# Returns a SQL statement for case/accent (if possible) insensitive match
def like(left, right, options={})
neg = (options[:match] == false ? 'NOT ' : '')
@@ -64,6 +72,10 @@
end
end
+ def firebird?
+ (ActiveRecord::Base.connection.adapter_name =~ /firebird/i).present?
+ end
+
# Resets database information
def reset
@postgresql_unaccent = nil
Index: config/locales/en-GB.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/en-GB.yml (date 1487680368000)
+++ config/locales/en-GB.yml (date 1487680385000)
@@ -1231,3 +1231,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/es-PA.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/es-PA.yml (date 1487680368000)
+++ config/locales/es-PA.yml (date 1487680385000)
@@ -1259,3 +1259,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/pt-BR.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/pt-BR.yml (date 1487680368000)
+++ config/locales/pt-BR.yml (date 1487680385000)
@@ -1247,3 +1247,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/sr-YU.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/sr-YU.yml (date 1487680368000)
+++ config/locales/sr-YU.yml (date 1487680385000)
@@ -1231,3 +1231,5 @@
field_updated_by: Updated by
field_last_updated_by: Last updated by
field_full_width_layout: Full width layout
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: config/locales/zh-TW.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/locales/zh-TW.yml (date 1487680368000)
+++ config/locales/zh-TW.yml (date 1487680385000)
@@ -1296,3 +1296,5 @@
description_date_from: 輸入起始日期
description_date_to: 輸入結束日期
text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。'
+ label_ascending_nulls_last: Ascending with null values at the end
+ label_descending_nulls_first: Descending with null values at the top
Index: app/helpers/sort_helper.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/helpers/sort_helper.rb (date 1487680368000)
+++ app/helpers/sort_helper.rb (date 1487680385000)
@@ -61,13 +61,13 @@
def available_criteria=(criteria)
unless criteria.is_a?(Hash)
- criteria = criteria.inject({}) {|h,k| h[k] = k; h}
+ criteria = criteria.inject({}) { |h, k| h[k] = k; h }
end
@available_criteria = criteria
end
def from_param(param)
- @criteria = param.to_s.split(',').collect {|s| s.split(':')[0..1]}
+ @criteria = param.to_s.split(',').collect { |s| s.split(':')[0..1] }
normalize!
end
@@ -77,15 +77,15 @@
end
def to_param
- @criteria.collect {|k,o| k + (o ? '' : ':desc')}.join(',')
+ @criteria.collect { |k, o| k + ":#{o.to_s}" }.join(',')
end
# Returns an array of SQL fragments used to sort the list
def to_sql
- sql = @criteria.collect do |k,o|
+ sql = @criteria.collect do |k, o|
if s = @available_criteria[k]
s = [s] unless s.is_a?(Array)
- s.collect {|c| append_order(c, o ? "ASC" : "DESC")}
+ s.collect { |c| append_order(c, o.to_s.upcase) }
end
end.flatten.compact
sql.blank? ? nil : sql
@@ -96,7 +96,7 @@
end
def add!(key, asc)
- @criteria.delete_if {|k,o| k == key}
+ @criteria.delete_if { |k, o| k == key }
@criteria = [[key, asc]] + @criteria
normalize!
end
@@ -112,7 +112,7 @@
end
def first_asc?
- @criteria.first && @criteria.first.last
+ @criteria.first && @criteria.first.last.to_s.downcase.start_with?("asc")
end
def empty?
@@ -123,8 +123,9 @@
def normalize!
@criteria ||= []
- @criteria = @criteria.collect {|s| s = Array(s); [s.first, (s.last == false || s.last == 'desc') ? false : true]}
- @criteria = @criteria.select {|k,o| @available_criteria.has_key?(k)} if @available_criteria
+ @criteria = @criteria.collect { |s| s = Array(s); [s.first, s[1].nil? ? 'asc' :
+ (s.last.to_s.downcase.start_with?('desc', 'asc')? s.last.to_s : 'asc')] }
+ @criteria = @criteria.select { |k, o| @available_criteria.has_key?(k) } if @available_criteria
@criteria.slice!(3)
self
end
@@ -134,7 +135,20 @@
if criterion =~ / (asc|desc)$/i
criterion
else
- "#{criterion} #{order}"
+ if (order =~ /nulls/i).present?
+ t = order.to_s.split(' ')
+ sort_order = t.first
+ nulls_last = t.last.to_s.downcase.eql?("last")
+ if Redmine::Database.mysql?
+ "ISNULL(#{criterion}) #{nulls_last ? "ASC" : "DESC"}, #{criterion} #{sort_order}"
+ elsif Redmine::Database.sqlserver? || Redmine::Database.sqlite3?
+ "#{criterion} IS NULL #{nulls_last ? "ASC" : "DESC"}, #{criterion} #{sort_order}"
+ else
+ "#{criterion} #{order}"
+ end
+ else
+ "#{criterion} #{order}"
+ end
end
end
@@ -158,12 +172,12 @@
#
def sort_init(*args)
case args.size
- when 1
- @sort_default = args.first.is_a?(Array) ? args.first : [[args.first]]
- when 2
- @sort_default = [[args.first, args.last]]
- else
- raise ArgumentError
+ when 1
+ @sort_default = args.first.is_a?(Array) ? args.first : [[args.first]]
+ when 2
+ @sort_default = [[args.first, args.last]]
+ else
+ raise ArgumentError
end
end
@@ -217,7 +231,7 @@
end
caption = column.to_s.humanize unless caption
- sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param }
+ sort_options = {:sort => @sort_criteria.add(column.to_s, order).to_param}
link_to(caption, {:params => request.query_parameters.merge(sort_options)}, :class => css)
end
Index: lib/redmine/field_format.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/redmine/field_format.rb (date 1487680368000)
+++ lib/redmine/field_format.rb (date 1487680385000)
@@ -293,8 +293,7 @@
# objects by their value of the custom field.
# Returns nil if the custom field can not be used for sorting.
def order_statement(custom_field)
- # COALESCE is here to make sure that blank and NULL values are sorted equally
- "COALESCE(#{join_alias custom_field}.value, '')"
+ "#{join_alias custom_field}.value" #COALESCE removed to allow null placement on order
end
# Returns a GROUP BY clause that can used to group by custom value
Index: app/views/queries/_form.html.erb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/views/queries/_form.html.erb (date 1487680368000)
+++ app/views/queries/_form.html.erb (date 1487680385000)
@@ -63,7 +63,7 @@
<%= label_tag "query_sort_criteria_direction_" + i.to_s,
l(:description_query_sort_criteria_direction), :class => "hidden-for-sighted" %>
<%= select_tag("query[sort_criteria][#{i}][]",
- options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc']], @query.sort_criteria_order(i)),
+ options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc'], [l(:label_ascending_nulls_last), 'asc nulls last'], [l(:label_descending_nulls_first), 'desc nulls first']], @query.sort_criteria_order(i)),
:id => "query_sort_criteria_direction_" + i.to_s) %>
<% end %>