OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#43393] [AppSignal] ActionView::Template::Error date out of range for timestamp
Dombi Attilaa840322fb8fa
diff --git a/modules/reporting/lib/report/operator.rb b/modules/reporting/lib/report/operator.rbindex 17953dbad60..cb9753fa12c 100644--- a/modules/reporting/lib/report/operator.rb+++ b/modules/reporting/lib/report/operator.rb@@ -91,7 +91,7 @@ class Report::Operatornew '!', label: :label_not_equals dodef modify(query, field, *values)where_clause = "(#{field} IS NULL"- where_clause += " OR #{field} NOT IN #{collection(*values)}" unless values.compact.empty?+ where_clause += " OR #{field} NOT IN #{collection(*values)}" unless values.all?(&:blank?)where_clause += ')'query.where where_clausequery@@ -117,7 +117,7 @@ class Report::Operatordef modify(query, field, *values)if values.size == 1 && values.first.nil?query.where "#{field} IS NULL"- elsif values.compact.empty?+ elsif values.all?(&:blank?)query.where '1=0'elsequery.where "#{field} IN #{collection(*values)}"diff --git a/modules/reporting/spec/models/cost_query/operator_spec.rb b/modules/reporting/spec/models/cost_query/operator_spec.rbindex 330e5b45210..6233da23b1d 100644--- a/modules/reporting/spec/models/cost_query/operator_spec.rb+++ b/modules/reporting/spec/models/cost_query/operator_spec.rb@@ -71,6 +71,10 @@ describe CostQuery, type: :model, reporting_query_helper: true doexpect(query('projects', 'id', '=', nil).size).to eq(0)end+ it "does = for empty string" do+ expect(query('projects', 'id', '=', '').size).to eq(0)+ end+it "does <=" doexpect(query('projects', 'id', '<=', project2.id - 1).size).to eq(1)end@@ -83,6 +87,10 @@ describe CostQuery, type: :model, reporting_query_helper: true doexpect(query('projects', 'id', '!', project1.id).size).to eq(1)end+ it "does ! for empty string" do+ expect(query('projects', 'id', '!', '').size).to eq(0)+ end+it "does ! for multiple values" doexpect(query('projects', 'id', '!', project1.id, project2.id).size).to eq(0)end