diff --git a/lib/pending_assigns_reminder.rb b/lib/pending_assigns_reminder.rb index cf2a7e3..370a9d1 100644 --- a/lib/pending_assigns_reminder.rb +++ b/lib/pending_assigns_reminder.rb @@ -35,7 +35,7 @@ class PendingAssignsReminder end def assigned_topics(user, order:) - Topic.joins(:_custom_fields).select(:slug, :id, :fancy_title, 'topic_custom_fields.created_at AS assigned_at') + Topic.joins(:_custom_fields).select(:slug, :id, :title, :fancy_title, 'topic_custom_fields.created_at AS assigned_at') .where('topic_custom_fields.name = ? AND topic_custom_fields.value = ?', TopicAssigner::ASSIGNED_TO_ID, user.id.to_s) .order("topic_custom_fields.created_at #{order}") .limit(3) diff --git a/spec/lib/pending_assigns_reminder_spec.rb b/spec/lib/pending_assigns_reminder_spec.rb index 6956830..0418101 100644 --- a/spec/lib/pending_assigns_reminder_spec.rb +++ b/spec/lib/pending_assigns_reminder_spec.rb @@ -33,6 +33,7 @@ RSpec.describe PendingAssignsReminder do @post1 = Fabricate(:post) @post2 = Fabricate(:post) + @post2.topic.update_column(:fancy_title, nil) @post3 = Fabricate(:post) TopicAssigner.new(@post1.topic, user).assign(user) TopicAssigner.new(@post2.topic, user).assign(user)