https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-11-19T19:37:02ZRedmineRedmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=122192009-11-19T19:37:02ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Category</strong> set to <i>Search engine</i></li></ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=281032011-04-19T06:37:10Zsnow windwaves
<ul></ul><p>+1. I log all my time for invoicing and have lots comments to back up my bills. it would be great to be able to search them</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=303272011-06-28T06:52:14ZJamie Gruener
<ul></ul><p>+1</p>
<p>We use Redmine time entry comments for invoices, too, and being able to search comments would be a real help.</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=479382013-04-05T09:24:20ZAlexander Bagiev
<ul></ul><p>+1<br />Since spent hours are associated with comments, we fill this field instead of notes, but cannot search.</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=520352013-09-24T20:36:33ZMischa The Evil
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/9063">Feature #9063</a>: Searchable comments from "Log time"</i> added</li></ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=520372013-09-24T20:56:00ZMischa The Evil
<ul><li><strong>File</strong> <a href="/attachments/10519">rm4138-make_time_entries_searchable-trunk_12160.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/10519/rm4138-make_time_entries_searchable-trunk_12160.diff">rm4138-make_time_entries_searchable-trunk_12160.diff</a> added</li></ul><p>I have created a rough patch, against Redmine trunk at <a class="changeset" title="Merged r12138, r12149, r12156 and r12157 from trunk to 2.3-stable (#14931) scm: fix annotate err..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/12160">r12160</a>, that should provide this feature.</p>
Known issues:
<ul>
<li>shown search results display <code>created_on</code> date of time entry comments instead of date from :date</li>
<li>time entry comments should be ordered by :date instead of :created_on (but can not because it is a date column)</li>
<li>no tests added yet</li>
</ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=521012013-09-27T13:28:25ZKarl Fenech
<ul></ul><p>Hi, <br />im new to this, can anyone let me know how patch can be installed?</p>
<p>Thanks in advance</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=521022013-09-27T13:45:34ZKarl Fenech
<ul></ul><p>Managed to run the patch but am getting the following:</p>
<p>bitnami@linux:/opt/bitnami/apps/redmine$ patch <del>p0 < rm4138.diff<br />can't find file to patch at input line 5<br />Perhaps you used the wrong -p or --strip option?<br />The text leading up to this was:<br />-------------------------</del>
|Index: lib/redmine.rb
|===================================================================
|--- lib/redmine.rb (revision 12160)
|+++ lib/redmine.rb (working copy)<br />--------------------------<br />File to patch:</p>
<p>Am i running the patch in the correct folder? How should i proceed?</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=521532013-09-30T03:09:06ZMischa The Evil
<ul></ul><p>Karl Fenech wrote:</p>
<blockquote>
<p>bitnami@linux:/opt/bitnami/apps/redmine$ patch p0 < rm4138.diff<br />...<br />Am i running the patch in the correct folder? How should i proceed?</p>
</blockquote>
<p>No, that is not the correct directory. It should be the top directory where Redmine source files are stored (a.k.a. the RAILS_ROOT or REDMINE_ROOT). It is {BITNAMI_DIR}/apps/redmine/htdocs for BitNami Redmine deployments<sup><a href="#fn1">1</a></sup>.</p>
<p id="fn1" class="footnote"><sup>1</sup> according to <a class="external" href="http://bitnami.com/stack/redmine/README.txt">http://bitnami.com/stack/redmine/README.txt</a></p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=522032013-10-01T07:21:59ZKarl Fenech
<ul></ul><p>Thanks, update worked. <br />I can now search for comments from the overall time spent under a project and is working fine. only thing that did not work is that comments cannot be searched using the search button top right, is this expected?</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=522092013-10-01T10:30:47ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/992">Feature #992</a>: Option to search open issues only</i> added</li></ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=522112013-10-01T10:31:46ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/3082">Feature #3082</a>: Repository Search</i> added</li></ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=523782013-10-09T03:07:53ZMischa The Evil
<ul><li><strong>Assignee</strong> set to <i>Mischa The Evil</i></li><li><strong>Target version</strong> set to <i>Unplanned backlogs</i></li></ul><p>I'll schedule some time to work on this issue to come up with a usable and tested (!) patch.</p>
<p>Karl Fenech wrote:</p>
<blockquote>
<p>Thanks, update worked. <br />I can now search for comments from the overall time spent under a project and is working fine. only thing that did not work is that comments cannot be searched using the search button top right, is this expected?</p>
</blockquote>
<p>No, it is not. I think the behavior you are experiencing is caused by other search variables. Though, I haven't tested the patch I posted well enough yet to be certain of that. To be continued...</p>
<p>Mischa The Evil wrote:</p>
<blockquote>
<ul>
<li>shown search results display <code>created_on</code> date of time entry comments instead of date from :date</li>
<li>time entry comments should be ordered by :date instead of :created_on (but can not because it is a date column)</li>
</ul>
</blockquote>
<p>A second look at the core code has left me in doubt if these two issues really are issues because the same <code>created_on</code> is already used/displayed in the activity view (<a class="changeset" title="Adds spent time to the activity view (#3809)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2877">r2877</a>). Any suggestions on this are welcome...</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=537902013-12-12T21:47:28ZMischa The Evil
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/13693">Feature #13693</a>: Possibility to search in time log comments</i> added</li></ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=538502013-12-16T10:55:32ZMischa The Evil
<ul><li><strong>File</strong> <a href="/attachments/10894">rm4138-make_time_entries_and_their_custom_fields_searchable-trunk_r12406.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/10894/rm4138-make_time_entries_and_their_custom_fields_searchable-trunk_r12406.diff">rm4138-make_time_entries_and_their_custom_fields_searchable-trunk_r12406.diff</a> added</li><li><strong>Target version</strong> changed from <i>Unplanned backlogs</i> to <i>Candidate for next minor release</i></li></ul>I continued working on this issue and have come up with a new, extended and thoroughly tested patch against Redmine trunk at <a class="changeset" title="Adds tests for custom field description." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/12406">r12406</a>. It turns out that the patch I posted earlier in note-6 was already fully functional and bug-free. The changes between that patch and the new patch I'll upload here are:
<ol>
<li>added three tests to search_controller_test<sup><a href="#fn1">1</a></sup> (including pulling-in the required time_entries fixtures) and one to timelog_controller_test<sup><a href="#fn2">2</a></sup> to make sure the new TimeEntry comments searching functionality works correctly in all the cases</li>
<li>fixed two assertions in <code>SearchControllerTest#test_search_all_projects</code> that broke due to the fact that issue 2 has now been pushed to the second page of the search results</li>
<li>added additional functionality to also search TimeEntry custom field values (this seems a logic next step now that TimeEntry comments can be searched)</li>
<li>added yet another test (with accompanying custom field and custom value fixtures) to search_controller_test<sup><a href="#fn3">3</a></sup> to make sure that TimeEntry custom field value searching is working correctly</li>
</ol>
<p>I tried to separate the patch into two dedicated patches, but this wasn't possible because of the test changes that are in the same file.</p>
<p>Please let me know if something else is needed to get these features integrated. Regarding the "issues" with the dates that are used to sort and display the search results that I mentioned earlier in note-6 and note-13: I stick to my previous conclusion that it is not a real issue. Though, it might be something that could be improved in the future (maybe we can change the event title to also include the date of the time entry?), but I don't think that something like that should block the possible integration of these features.</p>
<p>Disclaimer: the patch currently breaks an existing unit test (<code>ProjectTest#test_destroying_root_projects_should_clear_data</code>), but this is caused by a defect in the Redmine core instead of a bug in the functionality provided by the patch. See <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: TimeEntry custom_values are not deleted from the database when destroying the associated project (Closed)" href="https://www.redmine.org/issues/15709">#15709</a>.</p>
<p id="fn1" class="footnote"><sup>1</sup> <code>SearchControllerTest#test_search_time_entries_on_project</code>, <code>SearchControllerTest#test_search_time_entries_on_project_with_subprojects_scope</code> and <code>SearchControllerTest#test_search_time_entries_on_all_projects</code>.</p>
<p id="fn2" class="footnote"><sup>2</sup> <code>TimelogControllerTest#test_default_search_scope</code></p>
<p id="fn3" class="footnote"><sup>3</sup> <code>SearchControllerTest#test_search_time_entries_with_searchable_custom_fields</code></p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=837662018-02-25T16:58:30ZMarius BÄ‚LTEANU
<ul></ul><p>+1</p>
<p>Having the possibility to search in spent time comments will be very useful.<br /><a class="user active" href="https://www.redmine.org/users/1565">Mischa The Evil</a>, do you have the time to update your patch in order to apply cleanly on the current trunk? If not, I can take a look in the next period.</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=837782018-02-26T08:04:46ZMischa The Evil
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p><a class="user active" href="https://www.redmine.org/users/1565">Mischa The Evil</a>, do you have the time to update your patch in order to apply cleanly on the current trunk? If not, I can take a look in the next period.</p>
</blockquote>
<p>I'll see what I can do. Though, feel free to 'take over'. It doesn't seem too much of a work. It is mostly the tests that needs some rewrites (remove the use of <code>assigns</code> and, whenever possible, the fixture additions).</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=1039512021-08-26T08:36:03ZMischa The Evil
<ul><li><strong>File</strong> <a href="/attachments/27969">0001-Make-time-entries-searchable-by-their-comments-hours.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/27969/0001-Make-time-entries-searchable-by-their-comments-hours.patch">0001-Make-time-entries-searchable-by-their-comments-hours.patch</a> added</li><li><strong>File</strong> <a href="/attachments/27970">0002-Make-time-entries-searchable-by-their-custom-field-v.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/27970/0002-Make-time-entries-searchable-by-their-custom-field-v.patch">0002-Make-time-entries-searchable-by-their-custom-field-v.patch</a> added</li><li><strong>Assignee</strong> deleted (<del><i>Mischa The Evil</i></del>)</li></ul><p>Here's an updated patchset against <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/21200/entry/trunk">source:/trunk@21200</a> as a continuation of the patches provided in note#6 and note#15.</p>
Changes compared to the patch provided in note#15:
<ul>
<li>Patch: split-up the patch into atomic commits.</li>
<li>Feature: added additional support for searching time entries by their 'hours' and 'spent_on' attributes (along with their 'comments' attribute and their custom field values).</li>
<li>Implementation: added association preloading.</li>
<li>Implementation: rewritten test coverage using <code>assert_select</code> and added new tests for the added features.</li>
</ul>
Some notes about the patch transported from note#15:
<ul>
<li>It was needed to fix some assertions in <code>SearchControllerTest#test_search_all_projects</code> that broke due to the fact that issue 'Feature #2' has now been pushed to the second page of the search results.</li>
<li>The date that is used to sort and display the search results is the '<code>created_on</code>' date and not the '<code>date</code>' date.</li>
<li>It adds new <code>custom_fields</code> and <code>custom_values</code> test fixtures for a searchable time entry custom field.</li>
</ul>
<p>Please review, especially the code implementing the querying of the DB, thoroughly.</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=1039792021-08-29T03:45:31ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li></ul> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=1040502021-09-06T19:59:40ZMarius BÄ‚LTEANU
<ul><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>Candidate for next major release</i></li></ul><p>Thanks Misha for working on this.</p>
<p>Mischa The Evil wrote:</p>
<blockquote>
<ul>
<li>Feature: added additional support for searching time entries by their 'hours' and 'spent_on' attributes (along with their 'comments' attribute and their custom field values).</li>
</ul>
</blockquote>
<p>Searching in 'comments' and 'custom field value' is useful, for sure, but I'm not sure what to say about 'hours' and 'spent_on' because I don't see a real use case. 'spent_on' could be quite confusing because it accepts only the database format (yyyy-mm-dd) and some users are used to use the localization format (for ex: dd-mm-yyyy). I'm in favour of extracting the 'hours' and 'spent_on' to another ticket to get more feedback.</p>
<p>Also, I think it's important to check the impact on the application performance because on some instances, the time entries table can be bigger than the issue table (an issue tends to have more time entries).</p> Redmine - Feature #4138: Add spent time comments in searchhttps://www.redmine.org/issues/4138?journal_id=1112502023-10-29T06:06:54ZMischa The Evil
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/36059">Defect #36059</a>: Fulltext search in timelog comments</i> added</li></ul>