Project

General

Profile

Actions

Defect #36059

open

Fulltext search in timelog comments

Added by Jan K. about 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Search engine
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

The Redmine Fulltext search is a great feature. We use it all the time.

Unfortunately it does not search in the Comments of the Timelogs.

Is there any chynce to add this datasource to the fulltext search?


Files

add-spent-time-to-search.png (58.3 KB) add-spent-time-to-search.png Yuichi HARADA, 2022-02-10 02:40
36059.patch (2.68 KB) 36059.patch Yuichi HARADA, 2022-02-10 02:42

Related issues

Is duplicate of Redmine - Feature #4138: Add spent time comments in searchNeeds feedback2009-10-29

Actions
Actions #1

Updated by Yuichi HARADA almost 3 years ago

I fixed it so that comments on spent time can be searched. I have attached a patch.

diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb
index 88e1796f34..5422e3f273 100644
--- a/app/models/time_entry.rb
+++ b/app/models/time_entry.rb
@@ -28,6 +28,8 @@ class TimeEntry < ActiveRecord::Base
   belongs_to :activity, :class_name => 'TimeEntryActivity'

   acts_as_customizable
+  acts_as_searchable :columns => ['comments'],
+                     :preload => [:project, :issue]
   acts_as_event(
     :title =>
       Proc.new do |o|
diff --git a/lib/redmine/preparation.rb b/lib/redmine/preparation.rb
index 4c6b3afe6e..08b6c33fd9 100644
--- a/lib/redmine/preparation.rb
+++ b/lib/redmine/preparation.rb
@@ -383,6 +383,7 @@ module Redmine

       Search.map do |search|
         search.register :issues
+        search.register :time_entries
         search.register :news
         search.register :documents
         search.register :changesets
Actions #2

Updated by Go MAEDA almost 3 years ago

  • Target version set to Candidate for next major release
Actions #3

Updated by Mischa The Evil about 1 year ago

  • Is duplicate of Feature #4138: Add spent time comments in search added
Actions

Also available in: Atom PDF