Patch #1474

Show last comment/notes in the issue list

Added by Chris Peterson almost 9 years ago. Updated 4 days ago.

Status:ClosedStart date:2008-06-16
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues list
Target version:3.4.0

Description

This patch will add a column to show the last comment in the issue tracker list(also shows them in the csv and pdf outputs as well). This is helpful to get a quick status update on many issues without having to go into the issue

show_last_comment_in_issues_list.patch Magnifier (7.22 KB) Chris Peterson, 2008-06-16 21:20

095_add_issues_last_comment.rb Magnifier (195 Bytes) Chris Peterson, 2008-06-16 21:20

redmine-last-note-patch.diff Magnifier (6.7 KB) Tom Bull, 2016-03-07 20:45

add_last_notes_column.diff Magnifier (11.8 KB) Marius BALTEANU, 2016-12-26 12:00

last_notes_column.png (316 KB) Marius BALTEANU, 2016-12-26 12:04

add_last_notes_column_v2.diff Magnifier (29 KB) Marius BALTEANU, 2016-12-26 13:45

add_last_notes_column_v3.diff Magnifier (29 KB) Marius BALTEANU, 2016-12-26 14:20

rm1474-note_20_patch_against_trunk_r16111.patch Magnifier (11.4 KB) Mischa The Evil, 2016-12-27 05:12

rm1474-note_20_patch_against_trunk_r16233.patch Magnifier (11.4 KB) Marius BALTEANU, 2017-01-20 11:43


Related issues

Related to Redmine - Feature #10707: CSV and PDF should be able to export the last update issu... New
Related to Redmine - Feature #22452: Add ability to display last note on issue query Closed
Related to Redmine - Feature #1538: Adding "updates" information to CSV export New 2008-06-27
Duplicated by Redmine - Feature #20520: Latest comment on issue list Closed

Associated revisions

Revision 16367
Added by Jean-Philippe Lang 19 days ago

Show Last Comment in Issue list (#1474).

Patch by Marius BALTEANU.

Revision 16368
Added by Jean-Philippe Lang 19 days ago

Adds :label_last_notes string to locales (#1474).

Revision 16369
Added by Jean-Philippe Lang 19 days ago

Don't load all issues' journals (#1474).

Revision 16370
Added by Jean-Philippe Lang 19 days ago

Load only last journal with notes (#1474).

Revision 16376
Added by Jean-Philippe Lang 19 days ago

Fix loading of last visible journal (#1474, #6375).

History

#1 Updated by john aylward over 1 year ago

My company is looking for this feature as well. We'd like to be able to generate reports and show the last comment as an optional field in the issue reports. The patch here look similar what I'd need except it's very old.

What I'd expect to see is an option to add it similar to the "Show Description" option.

#2 Updated by Toshi MARUYAMA over 1 year ago

  • Category set to Issues

#3 Updated by Tom Bull about 1 year ago

I've developed a patch against the latest version in source control (post 3.2.0, it also works against 3.2.0). This should do the same thing - it also adds a length restriction to the field.

This patch was created for and funded by Noble Markets (http://noblex.io/)

#4 Updated by Tom Bull about 1 year ago

This issue is the same as or very similar to the following issues:
Issue #10707
Issue #20520

#5 Updated by Go MAEDA about 1 year ago

#6 Updated by Go MAEDA about 1 year ago

  • Related to Feature #10707: CSV and PDF should be able to export the last update issue comment added

#7 Updated by F. Priou about 1 year ago

Hello,

I'm newbie. How do you apply this patch ? Have you got small tutorial ?

thanks

#8 Updated by Tom Bull about 1 year ago

Patches are a standard file format, there's lots of information about how to apply them. Google is your friend. If you still have problems applying a patch after you've done your research on google, come back and ask about a specific problem you're having.

#9 Updated by F. Priou about 1 year ago

Hi,

Sorry, you're right.

So, i have an error when i run patch command (probably a newbie problem sorry...) :

D:\APPS\redmine\apps\redmine\htdocs>D:\APPS\redmine\git\usr\bin\patch.exe -p0 <
redmine-last-note-patch.diff
can't find file to patch at input line 67
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 96080580083081655a8b5879a8d04bef8042ace2 Mon Sep 17 00:00:00 2001
|From: Tom Bull <tom@tombull.com>
|Date: Wed, 2 Mar 2016 13:58:30 +0000
|Subject: [PATCH] Merge branch '3.2-stable' of github.com:redmine/redmine
|
|# Conflicts:
|#      config/locales/ar.yml
|#      config/locales/az.yml
|#      config/locales/bs.yml
|#      config/locales/ca.yml
|#      config/locales/cs.yml
|#      config/locales/da.yml
|#      config/locales/de.yml
|#      config/locales/el.yml
|#      config/locales/en-GB.yml
|#      config/locales/es-PA.yml
|#      config/locales/es.yml
|#      config/locales/et.yml
|#      config/locales/eu.yml
|#      config/locales/fa.yml
|#      config/locales/fi.yml
|#      config/locales/gl.yml
|#      config/locales/he.yml
|#      config/locales/hr.yml
|#      config/locales/hu.yml
|#      config/locales/id.yml
|#      config/locales/it.yml
|#      config/locales/ja.yml
|#      config/locales/ko.yml
|#      config/locales/lt.yml
|#      config/locales/lv.yml
|#      config/locales/mk.yml
|#      config/locales/mn.yml
|#      config/locales/nl.yml
|#      config/locales/no.yml
|#      config/locales/pl.yml
|#      config/locales/pt-BR.yml
|#      config/locales/pt.yml
|#      config/locales/ro.yml
|#      config/locales/ru.yml
|#      config/locales/sk.yml
|#      config/locales/sl.yml
|#      config/locales/sq.yml
|#      config/locales/sr-YU.yml
|#      config/locales/sr.yml
|#      config/locales/sv.yml
|#      config/locales/th.yml
|#      config/locales/tr.yml
|#      config/locales/uk.yml
|#      config/locales/vi.yml
|#      config/locales/zh.yml
|#      lib/redmine/pagination.rb
|---
| app/helpers/queries_helper.rb        | 12 ++++++++++++
| app/models/issue.rb                  | 10 ++++++++++
| app/models/issue_query.rb            |  1 +
| app/views/settings/_display.html.erb |  2 ++
| config/locales/en.yml                |  2 ++
| config/settings.yml                  |  3 +++
| public/stylesheets/application.css   |  2 +-
| 7 files changed, 31 insertions(+), 1 deletion(-)
|
|diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
|index 9ad2540..51f60c9 100644
|--- a/app/helpers/queries_helper.rb
|+++ b/app/helpers/queries_helper.rb
--------------------------
File to patch:

The file is present so i don't know what is the problem :

D:\APPS\redmine\apps\redmine\htdocs\app\helpers>dir queri*
 Volume in drive D is DATA
 Volume Serial Number is 0020-E5DB

 Directory of D:\APPS\redmine\apps\redmine\htdocs\app\helpers

06/12/2015  15:06             8 794 queries_helper.rb
               1 File(s)          8 794 bytes
               0 Dir(s)  12 256 325 632 bytes free

I have installed 3.2.0.2 windows version of redmine.

Have you got an idea of the problem ?

Thanks

#10 Updated by Tom Bull about 1 year ago

Maybe try with p1 rather than p0? I think this patch was prepared such that you'd need to use p1. Let me know if that works.

#11 Updated by F. Priou about 1 year ago

You're right. It works now.

Thank you very much !!

#12 Updated by Go MAEDA about 1 year ago

F. Priou, please use forums for questions.

#13 Updated by JW Fuchs 9 months ago

+1

#14 Updated by Toshi MARUYAMA 8 months ago

  • Related to Feature #22452: Add ability to display last note on issue query added

#15 Updated by Maik Lindner 6 months ago

+1

#16 Updated by Marius BALTEANU 3 months ago

We really need this feature and we made a patch that implements this.

Regarding the implementation:
  • the Last notes column behave like the description column (is shown under the issue row)
  • it can be exported to csv / pdf.
  • it checks the journal visibility
  • if both columns (description and last notes) are added to the query, the column name is displayed also in order to know which is the description and which is the last note.

Related to the implementation:
I'm not sure if it's a bug or not, but when I tried to use the method "visible_journals" from the Issue model I received the below SQL error:

Mysql2::Error: Unknown column 'projects.status' in 'where clause': SELECT `journals`.* FROM `journals` WHERE `journals`.`journalized_id` = 13 AND `journals`.`journalized_type` = 'Issue' AND ((journals.private_notes = 0 OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))))

#17 Updated by Go MAEDA 3 months ago

Marius BALTEANU, thank you for sharing the patch. But the patch cannot be applied to the current trunk (r16111) cleanly.
Could you provide a patch against the trunk?

$ patch -p1 < add_last_notes_column.diff
patching file app/helpers/queries_helper.rb
patching file app/models/issue.rb
patching file app/models/issue_query.rb
patching file app/views/issues/_list.html.erb
patching file app/views/issues/index.html.erb
patching file app/views/timelog/_list.html.erb
patching file config/locales/en.yml
patching file lib/redmine/export/pdf/issues_pdf_helper.rb
Hunk #1 FAILED at 266.
Hunk #2 succeeded at 327 with fuzz 2.
1 out of 2 hunks FAILED -- saving rejects to file lib/redmine/export/pdf/issues_pdf_helper.rb.rej
patching file public/stylesheets/application.css
patching file test/functional/issues_controller_test.rb
patching file test/unit/query_test.rb

#18 Updated by Marius BALTEANU 3 months ago

Very strange, I made the patch against the current trunk, but I used a new option to ignore the white spaces.

I attached a new version which applies ok.

#19 Updated by Go MAEDA 3 months ago

Marius BALTEANU, Thanks for the new patch.

Unfortunately I came across the error "SQLite3::SQLException: no such column: projects.status" while processing IssuesController#index.

#20 Updated by Marius BALTEANU 3 months ago

Go MAEDA wrote:

Unfortunately I came across the error "SQLite3::SQLException: no such column: projects.status" while processing IssuesController#index.

Sorry for the broken patches, I totally messed up the versions.

Now I have attached the 3rd version which applies ok and passes all the tests.

#21 Updated by Go MAEDA 3 months ago

  • Target version set to Candidate for next major release

Thanks to Marius, now it works fine for me. Passed all tests.

I have been using Redmine for customer support. This feature is very useful to check recent responses from customers.

#22 Updated by Marius BALTEANU 3 months ago

Go MAEDA wrote:

I have been using Redmine for customer support. This feature is very useful to check recent responses from customers.

Indeed, this is our use case too.

#23 Updated by Mischa The Evil 3 months ago

Marius BALTEANU wrote:

Now I have attached the 3rd version which applies ok and passes all the tests.

FWIW: I have extracted (from a trunk checkout at r16111) an updated version of your note 20 patch, without all these whitespace changes, which I'll hereby attach — thus trying to ease a review. I didn't change any of the code in the patch nor have I tested it.

#24 Updated by Go MAEDA 3 months ago

  • Target version changed from Candidate for next major release to 3.4.0

#25 Updated by Go MAEDA 3 months ago

  • Related to Feature #1538: Adding "updates" information to CSV export added

#26 Updated by Marius BALTEANU 2 months ago

Thanks Mischa for removing the whitespace changes from the patch.

I've updated the patch to work with the current trunk and to use the new logic implemented in #17720. Hope is good enough now.

#27 Updated by Jean-Philippe Lang 19 days ago

  • Subject changed from Show Last Comment in Issue Tracker list to Show last comment/notes in the issue list
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

Patch committed, thanks Marius.

#28 Updated by Go MAEDA 4 days ago

  • Category changed from Issues to Issues list

Also available in: Atom PDF