Feature #3143

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 over 9 years ago. Updated 8 months ago.

Status:NewStart date:2009-04-08
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
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.

add_notes.png (31.5 KB) Marius BALTEANU, 2016-04-16 19:13

add_notes_form.png (23.8 KB) Marius BALTEANU, 2016-04-16 19:14

add_notes_button.patch Magnifier (3.88 KB) Marius BALTEANU, 2016-04-16 19:20

add_notes_button_v3.patch Magnifier (7.06 KB) Marius BALTEANU, 2016-10-02 15:30

add_notes.diff Magnifier - Patch from carloskar (8.45 KB) C-O L, 2016-10-09 22:32

AddNotes.png - Screenshot from carloskar (72.3 KB) C-O L, 2016-10-09 22:32

add_notes_v3.diff Magnifier - By carloskar (5.02 KB) C-O L, 2016-10-11 14:00

missing_translation.JPG (13.6 KB) Sander Deryckere, 2017-02-22 15:13


Related issues

Related to Redmine - Feature #12060: Add comment field under the ticket New
Related to Redmine - Feature #12917: easy adding new notes/comments to issue New
Related to Redmine - Feature #17740: New context menu entry: "Add comment" New
Related to Redmine - Feature #4091: "Comment" link for issues New 2009-10-23
Related to Redmine - Feature #3852: Allow users to comment on issues without having to go thr... New 2009-09-12

History

#1 Updated by Dipan Mehta over 5 years ago

Duplicated by #12060 #12917

#2 Updated by Ismael Barros² over 4 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

#3 Updated by Dmitry Bezrukov over 4 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.

#4 Updated by Ismael Barros² about 4 years ago

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

#5 Updated by Nic Laflin about 4 years ago

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

#6 Updated by Go MAEDA about 4 years ago

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

#7 Updated by Go MAEDA about 4 years ago

#8 Updated by Go MAEDA about 4 years ago

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

#9 Updated by WDS D almost 4 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?

#10 Updated by dumb blob almost 4 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.

#11 Updated by Michael Erne almost 3 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

#12 Updated by Marius BALTEANU over 2 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

#13 Updated by Oscar Edvardsson over 2 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

#14 Updated by Marius BALTEANU over 2 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

#15 Updated by Marius BALTEANU over 2 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.

#16 Updated by Oscar Edvardsson over 2 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)).

#17 Updated by Marius BALTEANU over 2 years ago

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

#18 Updated by Marius BALTEANU over 2 years ago

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

#19 Updated by Oscar Edvardsson over 2 years ago

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

#20 Updated by Marius BALTEANU over 2 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.

#21 Updated by the fury over 2 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

#22 Updated by Marius BALTEANU over 2 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.

#23 Updated by the fury over 2 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. :)

#24 Updated by the fury over 2 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?

#25 Updated by Marius BALTEANU about 2 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.

#26 Updated by C-O L about 2 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?)

#27 Updated by C-O L about 2 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?)

#28 Updated by Sander Deryckere almost 2 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.

#29 Updated by Shay Sol over 1 year ago

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

#30 Updated by Den Mayer about 1 year 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..

#31 Updated by Dan Weaver 8 months ago

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

Also available in: Atom PDF