After apply fix_lost_backward_compatibility_about_return_type_of_ProjectQuery_results_scope.patch , Project.load_last_activity_date
's effect still lives as following:
Apply following patch for check.
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index f9a390c58..11078d89a 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -335,7 +335,9 @@ def bulk_destroy
# Returns the ProjectEntry scope for index
def project_scope(options={})
- @query.results_scope(options)
+ @query.results_scope(options).tap do |result|
+ binding.b
+ end
end
def retrieve_project_query
Open /projects with "Last activity" column.
Then, @last_activity_date
instance variable is exists following:
[334, 343] in ~/src/github.com/agileware-jp/redmine-dev-mirror/app/controllers/projects_controller.rb
334| private
335|
336| # Returns the ProjectEntry scope for index
337| def project_scope(options={})
338| @query.results_scope(options).tap do |result|
=> 339| binding.b
340| end
341| end
342|
343| def retrieve_project_query
=>#0 block {|result=[#<Project:0x00007fe246c212c8 id: 1, name...|} in project_scope at ~/src/github.com/agileware-jp/redmine-dev-mirror/app/controllers/projects_controller.rb:339
#1 Kernel#tap at <internal:kernel>:90
# and 70 frames (use `bt' command for all frames)
(ruby) result.to_a.first.instance_variable_get(:@last_activity_date)
Fri, 01 Nov 2024 17:10:02.900305000 UTC +00:00
(ruby) result.to_a.first.instance_variable_get(:@last_activity_date).class
ActiveSupport::TimeWithZone