From ee09e03f3d38e9dee58c03f03ea492173151c86b Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Sun, 15 Feb 2026 11:07:49 +0900 Subject: [PATCH] Hide unused Options section in spent time report --- app/assets/stylesheets/application.css | 2 ++ app/views/timelog/report.html.erb | 1 + test/system/timelog_test.rb | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 9ab5aa695..244b07805 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -633,6 +633,8 @@ div.table-list.boards .table-list-cell.name {inline-size: 30%;} .query-totals>span:not(:first-child) {margin-inline-start: 0.6em;} .query-totals .value {font-weight:bold;} body.controller-timelog .query-totals {margin-block-start: initial;} +/* Spent time report does not use options, hide the options section */ +body.controller-timelog.action-report fieldset#options {display: none;} body.controller-gantts fieldset#options > div > div { display: flex; diff --git a/app/views/timelog/report.html.erb b/app/views/timelog/report.html.erb index 180ac1512..1aa446860 100644 --- a/app/views/timelog/report.html.erb +++ b/app/views/timelog/report.html.erb @@ -13,6 +13,7 @@ <% @report.criteria.each do |criterion| %> <%= hidden_field_tag 'criteria[]', criterion, :id => nil %> <% end %> + <%# Report view does not use query options for results, so the options section is hidden by CSS. %> <%= render :partial => 'timelog/date_range' %>

: <%= select_tag 'columns', options_for_select([[l(:label_year), 'year'], diff --git a/test/system/timelog_test.rb b/test/system/timelog_test.rb index d613cfc3f..d7d0a774c 100644 --- a/test/system/timelog_test.rb +++ b/test/system/timelog_test.rb @@ -100,4 +100,11 @@ class TimelogTest < ApplicationSystemTestCase assert page.has_no_text?('Comment') end end + + def test_report_should_hide_options + log_user 'jsmith', 'jsmith' + visit '/projects/ecookbook/time_entries/report' + + assert_selector 'fieldset#options', visible: :hidden + end end -- 2.50.1