Project

General

Profile

Feature #40706 » link_to_activity.patch

Go MAEDA, 2024-05-17 05:04

View differences:

app/helpers/projects_queries_helper.rb
get_project_status_label[column.value_object(item)]
when :parent_id
link_to_project(item.parent) unless item.parent.nil?
when :last_activity_date
formatted_value = super
if value.present? && formatted_value.present?
link_to(
formatted_value,
project_activity_path(item, :from => User.current.time_to_date(value))
)
else
formatted_value
end
else
super
end
test/functional/projects_controller_test.rb
assert_response :success
end
assert_equal ['Name', 'Description', 'Last activity'], columns_in_list
assert_select 'tr#project-1 td.last_activity_date', :text => format_time(Journal.find(3).created_on)
activity_time = Journal.find(3).created_on
assert_select "tr#project-1 td.last_activity_date a[href=?]",
project_activity_path(Project.find(1), :from => User.current.time_to_date(activity_time)),
:text => format_time(activity_time)
assert_select 'tr#project-4 td.last_activity_date', :text => ''
end
(3-3/3)