From 3b51625df4be70fa037afe994cd91c392b7fbd89 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 3 Nov 2026 22:12:47 -0500 Subject: [PATCH] Fix sorting and grouping time entries by Billed The time entry Billed column sorted by time_entries.name, which doesn't exist, so sorting or grouping by it failed. The issue list's Billed column is removed: issues have no billed value, so showing or sorting it always failed. Co-Authored-By: Claude Opus 5.5 --- lib/redmine_qbo/patches/query_patch.rb | 1 - lib/redmine_qbo/patches/time_entry_query_patch.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/redmine_qbo/patches/query_patch.rb b/lib/redmine_qbo/patches/query_patch.rb index 99adb32..5495c01 100644 --- a/lib/redmine_qbo/patches/query_patch.rb +++ b/lib/redmine_qbo/patches/query_patch.rb @@ -32,7 +32,6 @@ module RedmineQbo unless @available_columns @available_columns = self.class.available_columns.dup @available_columns << QueryColumn.new(:customer, sortable: "#{Issue.table_name}.customer_id", groupable: true, caption: :field_customer) - @available_columns << QueryColumn.new(:billed, sortable: "#{TimeEntry.table_name}.billed", groupable: true, caption: :field_billed) end super end diff --git a/lib/redmine_qbo/patches/time_entry_query_patch.rb b/lib/redmine_qbo/patches/time_entry_query_patch.rb index f3b54d2..6017e52 100644 --- a/lib/redmine_qbo/patches/time_entry_query_patch.rb +++ b/lib/redmine_qbo/patches/time_entry_query_patch.rb @@ -17,7 +17,7 @@ module RedmineQbo def available_columns unless @available_columns @available_columns = self.class.available_columns.dup - @available_columns << QueryColumn.new(:billed, sortable: "#{TimeEntry.table_name}.name", groupable: true, caption: :field_billed) + @available_columns << QueryColumn.new(:billed, sortable: "#{TimeEntry.table_name}.billed", groupable: "#{TimeEntry.table_name}.billed", caption: :field_billed) end super end