Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/event/particulars.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Event::Particulars
extend ActiveSupport::Concern

included do
attribute :particulars, :json

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a regression test for the MariaDB JSON-as-LONGTEXT scenario to ensure store_accessor :particulars keeps working. For example, define a temporary test table/model with a :text particulars column, include Event::Particulars, and assert setting/reading assignee_ids does not raise ActiveRecord::ConfigurationError.

Copilot uses AI. Check for mistakes.
store_accessor :particulars, :assignee_ids
end

Expand Down
1 change: 1 addition & 0 deletions app/models/filter/fields.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def indexed_by_human_name(index)
end

included do
attribute :fields, :json

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a regression test that fails when the backing column is treated as text (MariaDB JSON-as-LONGTEXT) to ensure store_accessor :fields continues to work. One approach is a small test model/table with a :text fields column that includes Filter::Fields and asserts reading/writing a store accessor does not raise ActiveRecord::ConfigurationError.

Suggested change
attribute :fields, :json
if respond_to?(:columns_hash) && columns_hash["fields"]&.type == :json
attribute :fields, :json
end

Copilot uses AI. Check for mistakes.
store_accessor :fields, :assignment_status, :indexed_by, :sorted_by, :terms,
:card_ids, :creation, :closure

Expand Down
Loading