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
`Query::Results`: fixing whitespace [ci-skip]
Sebastian Fiedlschuster6aa1fa2903a9
diff --git a/app/models/query/timestamps.rb b/app/models/query/timestamps.rbindex 378da2646b5..099a267db40 100644--- a/app/models/query/timestamps.rb+++ b/app/models/query/timestamps.rb@@ -31,7 +31,7 @@ module Query::Timestampsincluded doserialize :timestamps, Array-+# Returns the timestamps the query should be evaluated at.## In the database, the timestamps are stored as ISO8601 strings.@@ -47,10 +47,10 @@ module Query::Timestamps}return timestamps.any? ? timestamps : [Timestamp.now]end-+def timestamps=(array)super(array.collect { |element| element.respond_to?(:iso8601) ? element.iso8601 : element })endend-+enddiff --git a/spec/models/query/results_filter_on_historic_data_spec.rb b/spec/models/query/results_filter_on_historic_data_spec.rbindex 1beddef5c79..ae0208951ed 100644--- a/spec/models/query/results_filter_on_historic_data_spec.rb+++ b/spec/models/query/results_filter_on_historic_data_spec.rb@@ -51,19 +51,19 @@ describe ::Query::Results, 'Filter on historic data', type: :model, with_mail: fmember_in_project: project_1,member_with_permissions: [:view_work_packages])end--++describe "[prelims]" dospecify "the work package has a journal entry with the historic description" doexpect(work_package.journals.count).to eq 2expect(work_package.journals.first.data.description).to eq "This is the original description of the work package"end-+specify "the work package has its current description" doexpect(work_package.description).to eq "This is the current description of the work package"endend-+describe "#work_packages" dolet(:query) dologin_as(user_1)@@ -74,7 +74,7 @@ describe ::Query::Results, 'Filter on historic data', type: :model, with_mail: fendlet(:results) { query.results }subject { results.work_packages }-+describe "filter for description containing 'current'" dolet(:search_term) { 'current' }it "includes the work package matching today" do@@ -88,7 +88,7 @@ describe ::Query::Results, 'Filter on historic data', type: :model, with_mail: fexpect(subject).not_to include work_packageendend-+describe "when searching current and historic work packages" dobefore { query.timestamps = [historic_time, Time.zone.now] }@@ -106,7 +106,7 @@ describe ::Query::Results, 'Filter on historic data', type: :model, with_mail: fendendend-+describe "when searching only historic work packages" dobefore { query.timestamps = [historic_time] }@@ -119,7 +119,7 @@ describe ::Query::Results, 'Filter on historic data', type: :model, with_mail: fdescribe "filter for description containing 'original'" dolet(:search_term) { 'original' }-+it "includes the work package matching in the past" doexpect(subject).to include work_packageend@@ -129,7 +129,7 @@ describe ::Query::Results, 'Filter on historic data', type: :model, with_mail: fendendend-+describe "when searching only pre-historic work packages (i.e. when the work package does not exist yet)" dobefore { query.timestamps = [pre_historic_time] }