Project

General

Profile

Actions

Feature #3143

open

Add an 'Add Note' function to issue, to avoid optimistic-lock of issue' update when user just want to add a note

Added by Chaoqun Zou almost 15 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Start date:
2009-04-08
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Most of the issue's update operations are to add a note but not to update the issue's attributes. And if an issue is updated frequently, there may be lots of optimistic-locks which prevent the issue to be saved.

So I thought it would be better to extract the 'add note' function from issue's update, then multi-users can add their notes simultaneously.


Files

add_notes.png (31.5 KB) add_notes.png Marius BĂLTEANU, 2016-04-16 19:13
add_notes_form.png (23.8 KB) add_notes_form.png Marius BĂLTEANU, 2016-04-16 19:14
add_notes_button.patch (3.88 KB) add_notes_button.patch Marius BĂLTEANU, 2016-04-16 19:20
add_notes_button_v3.patch (7.06 KB) add_notes_button_v3.patch Marius BĂLTEANU, 2016-10-02 15:30
add_notes.diff (8.45 KB) add_notes.diff Patch from carloskar C-O L, 2016-10-09 22:32
AddNotes.png (72.3 KB) AddNotes.png Screenshot from carloskar C-O L, 2016-10-09 22:32
add_notes_v3.diff (5.02 KB) add_notes_v3.diff By carloskar C-O L, 2016-10-11 14:00
missing_translation.JPG (13.6 KB) missing_translation.JPG Sander Deryckere, 2017-02-22 15:13
0001-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch (5.68 KB) 0001-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch Marius BĂLTEANU, 2019-03-25 22:36
add_notes.png (151 KB) add_notes.png Marius BĂLTEANU, 2019-03-25 22:46
0001b-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch (5.96 KB) 0001b-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch José Esteves, 2019-10-09 13:39
0001b-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch (5.43 KB) 0001b-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch José Esteves, 2019-10-09 13:54
3143.patch (4.92 KB) 3143.patch Dmitry Makurin , 2023-01-11 13:38

Related issues

Related to Redmine - Feature #12060: Add comment field under the ticketNew

Actions
Related to Redmine - Feature #12917: easy adding new notes/comments to issueNew

Actions
Related to Redmine - Feature #17740: New context menu entry: "Add comment"New

Actions
Related to Redmine - Feature #4091: "Comment" link for issuesNew2009-10-23

Actions
Related to Redmine - Feature #3852: Allow users to comment on issues without having to go through UpdateNew2009-09-12

Actions
Actions #1

Updated by Dipan Mehta almost 11 years ago

Duplicated by #12060 #12917

Actions #2

Updated by Ismael Barros² almost 10 years ago

+1, I'd very much welcome this feature :)

Almost none of the people I've worked with (programmers, technical people) was able to understand at first glance how to add a comment in a issue

Actions #3

Updated by Dmitry Bezrukov over 9 years ago

Redmine is a great software, only it took me some time to understand on how to add a note/comment.
I would expect it to be at the bottom of the issue notes.
Great GUI rule: Don't let me read a manual.
Thanks for prioritizing this improvement.

Actions #4

Updated by Ismael Barros² over 9 years ago

Does anyone know if there's any plugin out there that implements this functionality?

Actions #5

Updated by Nic Laflin over 9 years ago

I too would like to see this, it seems that the quote button almost handle's this.

Actions #6

Updated by Go MAEDA over 9 years ago

  • Related to Feature #17740: New context menu entry: "Add comment" added
Actions #7

Updated by Go MAEDA over 9 years ago

Actions #8

Updated by Go MAEDA over 9 years ago

  • Related to Feature #3852: Allow users to comment on issues without having to go through Update added
Actions #9

Updated by WDS D about 9 years ago

I am desperately looking for that feature. And also the ability to display notes/comments and change history separately

Ismael Barros² wrote:

Does anyone know if there's any plugin out there that implements this functionality?

Actions #10

Updated by dumb blob about 9 years ago

I'd like to raise my hand for this as well. It's utterly important for our organization as it's by far the most frequent confusion among users.

Also, the tiny, nearly invisible, pencil button near "Description:" should be expanded by default when updating/editing the issue.

Actions #11

Updated by Michael Erne about 8 years ago

Hi everybody,

We recently switched on Redmine and would love to have a function to add quickly a note because editing an issue to quickly add a note seems really disturbing to us. It is really usefull to take notes related to each issue so that we have all the informations and questions we had about it. What is planned for this point? Will the next release have something like this?

Thank you very much for your answer.

Best Regards, Michael

Actions #12

Updated by Marius BĂLTEANU almost 8 years ago

I've attached a patch (add_notes_button.patch) that implements this feature by adding a new button named "Add notes" to the bottom of the issue page.

After is clicked, the form for adding notes and attachments is shown.

If the patch is accepted, I'll update it to include:
- a UI test
- Translations for current languages.

Also, the current tests pass

Actions #13

Updated by Oscar Edvardsson almost 8 years ago

Nice to see some work being done on this issue!

I tried your patch though, and for me it only seems to reload the page. I can see in the log though that it does render it (Rendered journals/_notes_new_form.html.erb (11.4ms)).
I have verified that the patch was applied successfully, and I have tried with both the custom theme we are using and default theme and with different users (one of them admin) - with no luck. I have not made any other modifications to Redmine, save for a mylyn connector.

Environment:
Redmine version 3.2.0.stable
Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux]
Rails version 4.2.5
Environment production
Database adapter PostgreSQL
SCM:
Mercurial 2.8.2
Git 1.9.1
Filesystem
Redmine plugins:
redmine_mylyn_connector 2.8.2.stable

Actions #14

Updated by Marius BĂLTEANU almost 8 years ago

Oscar Edvardsson wrote:

Nice to see some work being done on this issue!

I tried your patch though, and for me it only seems to reload the page. I can see in the log though that it does render it (Rendered journals/_notes_new_form.html.erb (11.4ms)).
I have verified that the patch was applied successfully, and I have tried with both the custom theme we are using and default theme and with different users (one of them admin) - with no luck. I have not made any other modifications to Redmine, save for a mylyn connector.

Environment:
Redmine version 3.2.0.stable
Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux]
Rails version 4.2.5
Environment production
Database adapter PostgreSQL
SCM:
Mercurial 2.8.2
Git 1.9.1
Filesystem
Redmine plugins:
redmine_mylyn_connector 2.8.2.stable

The patch was developed against Revision r15317

I tested now on 3.2.1-stable and works fine. I'll try later to test the patch against version 3.2.0.stable and also against latest revision.

My Environment:
Redmine version 3.2.1.devel
Ruby version 2.2.3-p173 (2015-08-18) [x86_64-linux]
Rails version 4.2.5.2
Environment development
Database adapter Mysql2

Actions #15

Updated by Marius BĂLTEANU almost 8 years ago

Marius BALTEANU wrote:

I'll try later to test the patch against version 3.2.0.stable and also against latest revision.

I tested also on 3.2.0 (with and without your plugin) and works fine (Chrome and Firefox latest versions). That reload should be a POST request to /issues/<id> and you should receive a 302 redirect as response from the server (the patch uses the same post method from edit issues). I don't know how can I help you further to debug your problem, so I'll wait for someone else feedback.

Actions #16

Updated by Oscar Edvardsson almost 8 years ago

Marius BALTEANU wrote:

I tested also on 3.2.0 (with and without your plugin) and works fine (Chrome and Firefox latest versions). That reload should be a POST request to /issues/<id> and you should receive a 302 redirect as response from the server (the patch uses the same post method from edit issues). I don't know how can I help you further to debug your problem, so I'll wait for someone else feedback.

I never thought of testing a different browser… Works on Chrome, but not Safari (Version 9.1 (11601.5.17.1)).

Actions #17

Updated by Marius BĂLTEANU almost 8 years ago

Thanks for the feedback, I'll check why the patch is not working on Safari.

Actions #18

Updated by Marius BĂLTEANU almost 8 years ago

I've just tested the patch on Safari Version 9.1 (11601.5.17.1) and works fine.

Actions #19

Updated by Oscar Edvardsson almost 8 years ago

Odd, now it works splendidly. I did restart Redmine though, maybe that was needed...?

Actions #20

Updated by Marius BĂLTEANU almost 8 years ago

Oscar Edvardsson wrote:

Odd, now it works splendidly. I did restart Redmine though, maybe that was needed...?

Yes, restarting the application server is a must.

Actions #21

Updated by the fury almost 8 years ago

Would it be possible to have that "add note" field open by default, like the reply box in most forums (XenForo, etc.)?

For that matter, the same should happen on threads in Redmine forum...

That would make it super easy to comment on an issue

Actions #22

Updated by Marius BĂLTEANU almost 8 years ago

the fury wrote:

Would it be possible to have that "add note" field open by default, like the reply box in most forums (XenForo, etc.)?

For that matter, the same should happen on threads in Redmine forum...

That would make it super easy to comment on an issue

Both solutions requires one click for adding a note:
- "Add Notes" button: After you click it, the focus is set automatically on the field and you can start typing
- Field box open by default: you need to click on it to focus the field

Because of that, I would prefer the "Add notes" button.

Actions #23

Updated by the fury almost 8 years ago

Marius BALTEANU wrote:

the fury wrote:

Would it be possible to have that "add note" field open by default, like the reply box in most forums (XenForo, etc.)?

For that matter, the same should happen on threads in Redmine forum...

That would make it super easy to comment on an issue

Both solutions requires one click for adding a note:
- "Add Notes" button: After you click it, the focus is set automatically on the field and you can start typing
- Field box open by default: you need to click on it to focus the field

Because of that, I would prefer the "Add notes" button.

True, only a single action in both cases, but in terms of intuitive interface, if the comment field is visible by default, it makes it obvious that's where one goes to leave a comment on the issue, so people don't have to hunt around or get trained on how to use the thing. I'm faced with the task of bringing dozens of people at work on board to Redmine, where the existing "system" is email and Office docs on network shares...so really, anything's an improvement, but I'm hoping to minimize the friction against change by having the most discoverable UI possible.

Now that I look at the patch, it's just a matter of the CSS, so I could just override it in my theme. I'm cool with that, going to apply the patch now. :)

Actions #24

Updated by the fury almost 8 years ago

Marius BALTEANU wrote:

I've attached a patch (add_notes_button.patch) that implements this feature by adding a new button named "Add notes" to the bottom of the issue page.

I've applied the patch on my copy (I'm on 3.2.1-stable) and restarted Redmine, however the issue view now reports a 500 internal server error. I have the redmine_ckeditor plugin installed, and it looks like there is something going wonky here:

ActionView::Template::Error (undefined method `id' for nil:NilClass):
    11:     <%= f.check_box :private_notes, :no_label => true %>
    12:       <label for="issue_private_notes"><%= l(:field_private_notes) %>  </label>
    13:     <% end %>
    14:     <%= call_hook(:view_journals_notes_form_after_notes, { :issue => @issue}) %>
    15:
    16:     <p><%= render :partial => 'attachments/form', :locals => {:container => @issue} %></p>
    17:     </fieldset>
  plugins/redmine_ckeditor/lib/redmine_ckeditor/hooks/journal_listener.rb:10:in `view_journals_notes_form_after_notes'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:96:in `call_hook'
  app/views/journals/_notes_new_form.html.erb:14:in `block in _app_views_journals__notes_new_form_html_erb__4104637093308884883_47486000'
  app/helpers/application_helper.rb:1030:in `labelled_form_for'
  app/views/journals/_notes_new_form.html.erb:5:in `_app_views_journals__notes_new_form_html_erb__4104637093308884883_47486000'
  app/views/issues/show.html.erb:132:in `_app_views_issues_show_html_erb___4381887501222243197_48895720'
  app/controllers/issues_controller.rb:118:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:115:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Line 10 in the file plugins/redmine_ckeditor/lib/redmine_ckeditor/hooks/journal_listener.rb:

var note_id = "journal_#{journal.id}_notes";

I don't know a whole lot about Redmine code and plugins, but shouldn't it be passed a journal object in order for it to work, or should the listener on the plugin be changed so that it works if it doesn't receive a journal object?

Actions #25

Updated by Marius BĂLTEANU over 7 years ago

Attached is an updated patch which includes some fixes.

I would really appreciate any feedback on this patch in order to have it committed in a further version.

Actions #26

Updated by C-O L over 7 years ago

Marius BALTEANU wrote:

Attached is an updated patch which includes some fixes.

I would really appreciate any feedback on this patch in order to have it committed in a further version.

Hi all,
I have always thought that the "Edit issue to leave a comment" was kind of odd, so now after Marius almost made it the way I wanted it I decided to give it a try, so here is my contribution using 3.3.0 as base with great help from Marius patch:

  • The Add notes form is always visible at the bottom of the page (after the History) for user allowed to add notes.
  • An "Add notes" link has been added to the action menu which takes the user to the Add notes form (for users allowed to add notes).
  • The "Edit" link in the action menu is only visible for users allowed to edit the issue.
  • The second action menu has been relocated from the bottom to just below the issue, before the history.
  • The edit issue form has been moved to below the second action menu. The edit issue form still has its own notes input.
  • The Add notes form is used when quoting.
  • Uploading files is working from both Edit issue and Add notes (with some color errors in the UI for Add notes, maybe I missed something?)
Actions #27

Updated by C-O L over 7 years ago

I reconsidered the implementation a bit an here is a new version that is using all the existing elements with some small adjustments so there are fewer modifications and more likely to work with plugins.

  • The Add notes form is always visible at the bottom of the page (after the History) for user allowed to add notes.
  • An "Add notes" link has been added to the action menu which takes the user to the Add notes form (for users allowed to add notes).
  • The "Edit" link in the action menu is only visible for users allowed to edit the issue.
  • The second action menu has been relocated from the bottom to just below the issue details, I think it makes more sense there.
  • The edit issue form has been moved to below the second action menu. The edit issue form still has its own notes input.
  • The Add notes form is used when quoting.
  • Uploading files is working from both Edit issue and Add notes (with some color errors in the UI for Add notes, maybe I missed something?)
Actions #28

Updated by Sander Deryckere about 7 years ago

I just tried the patch by C-O L, and the interface does feel a lot better. Leaving an "Edit" button for admins, and just having an "Add note" button for regular reporters.

The only problem I have is that the button doesn't find its text in the translation file. Though I guess that's due to me not compiling the translation files, or not deleting the cache or so... I still need to figure out what's happening there.

Another remark is that the notes are placed in a div, so it looks like a box in a box in a box. That's not an issue with this patch, but with the existing style. It makes sense for an admin to put all different edit panes in one div together, but for a regular reporter who can only add notes, there's a box too much IMO.

All in all, it's a great improvement for the user experience, and I hope this will be included in the next version.

Actions #29

Updated by Shay Sol almost 7 years ago

Hi, I applied the patch, tried it and it has a problem with redmine_ckeditor. Someone solved it?

Actions #30

Updated by Den Mayer over 6 years ago

It can't work properly. When I installed the last patch the Edit button stopped opening the block for editing
Redmine version 3.3.1
Any of thoughts? In console (Devtools) I did not see any errors..

Actions #31

Updated by Dan Weaver almost 6 years ago

Can anyone help to get it working on redmine 3.4? Really need this.

Actions #32

Updated by Bernhard Rohloff about 5 years ago

+1 If we could get this patch integrated it would be an extremely huge step forward.
This is the one of the first questions everybody asks if I show them how to use Redmine.

Actions #33

Updated by Marius BĂLTEANU almost 5 years ago

Bernhard Rohloff wrote:

+1 If we could get this patch integrated it would be an extremely huge step forward.
This is the one of the first questions everybody asks if I show them how to use Redmine.

I totally agree with you, Bernhard.

I'm attaching a patch created based on the patch proposed by C-O L. The patch implements partially this feature (partially because it doesn't avoid the optimistic-lock) and it doesn't change the HTML of the page, it is based mostly on JS.


Even if I'm not 100% happy with this solution, I think it is a good step forward.

Any feedback is welcome.

Actions #34

Updated by José Esteves over 4 years ago

+1 for this feature!

I'm testing Marius Patch and Is working great so far, even in reverse chronological order of notes.

Mobile also looks good

Just have to resolve un minor conflict to match master branch.

I attach the updated patch!

Actions #36

Updated by Robert Röttger about 4 years ago

+1 for this

Actions #37

Updated by Leo L. about 3 years ago

Hey everyone.

I tried to apply the latest patch, but it fails for some reason I couldn't figured out :

|diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb
|index b535fae..de255bc 100644
|--- a/app/views/issues/_action_menu.html.erb
|+++ b/app/views/issues/_action_menu.html.erb
--------------------------
File to patch:

Can someone point me at the right direction ?
Thanks :)

--
Léo.

Actions #38

Updated by Ismael Barros² about 3 years ago

Which command did you use to apply the patch? patch -p0? patch -p1? git apply?

Actions #39

Updated by Leo L. almost 3 years ago

Ismael Barros² wrote:

Which command did you use to apply the patch? patch -p0? patch -p1? git apply?

Hey Ismael,

Sorry I didn't check on updates about that.
I used "patch -p0 < 0001b-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch" inside redmine root's folder.

(saw on https://www.redmine.org/projects/redmine/wiki/patch)

For the record, the detailed error message :

gorby@server:/usr/www/redmine # patch -p0 < 0001b-Adds-Add-notes-link-to-issue-page-to-add-only-notes.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 472b31017a84d8c91330dccfb47d241c8ae4a2bb Mon Sep 17 00:00:00 2001
|From: Marius <marius.****@zitec.com>
|Date: Tue, 26 Feb 2019 07:33:10 +0000
|Subject: Adds "Add notes" link to issue page to add only notes
|
|Signed-off-by: Jose <jose@***>
|---
| app/views/issues/_action_menu.html.erb      |  3 +++
| app/views/issues/_action_menu_edit.html.erb |  2 +-
| app/views/issues/_edit.html.erb             |  8 ++++----
| config/locales/en.yml                       |  1 +
| public/javascripts/application.js           | 14 ++++++++++++++
| public/stylesheets/application.css          |  2 +-
| 6 files changed, 24 insertions(+), 6 deletions(-)
|
|diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb
|index bd7bcc05f..aabd5c021 100644
|--- a/app/views/issues/_action_menu.html.erb
|+++ b/app/views/issues/_action_menu.html.erb
--------------------------

--
Léo.

Actions #40

Updated by Ismael Barros² almost 3 years ago

Directories a/ and b/ won't actually exist on your filesystem, so I think you need to use patch -p1 instead of patch -p0

Actions #41

Updated by Leo L. almost 3 years ago

Ismael Barros² wrote:

Directories a/ and b/ won't actually exist on your filesystem, so I think you need to use patch -p1 instead of patch -p0

Ismael,

Thanks for the heads up, I didn't know anything about the "patch" command :)
Your suggestion was correct, and with "p1" instead of "p0", everything run smoothly.

Greetings from Paris, France !

--
Léo.

Actions #42

Updated by Dmitry Makurin about 1 year ago

An updated patch 3143.patch for r22024.

Actions

Also available in: Atom PDF