Feature #13919

Mention user on comment/description using @user with autocomplete

Added by Diego Antunes over 6 years ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Email notifications
Target version:4.2.0
Resolution:

Description

https://github.com/dwarburt/redmine-mention-plugin is ok, but I think would be awesome to have something like Github where it has an inline autocomplete for users etc. I think this should be built into the core plugins maybe?

for reference check this out https://github.com/tactivos/jquery-sew

feature_13919_v1.patch Magnifier (11.2 KB) Mizuki ISHIKAWA, 2019-03-07 05:34

feature_13919_v2.patch Magnifier (20.9 KB) Mizuki ISHIKAWA, 2019-03-26 07:15

0001-Demo-for-acts_as_mentionable.patch Magnifier (3.5 KB) Marius BALTEANU, 2019-09-10 19:05


Related issues

Related to Redmine - Feature #4179: Link to user in wiki syntax Closed 2009-11-08
Related to Redmine - Feature #26127: Display user logins on profiles Closed
Related to Redmine - Patch #31989: Inline issue auto complete (#) in fields with text-format... Closed
Duplicated by Redmine - Feature #15828: mention system. Closed
Duplicated by Redmine - Feature #16478: Several people involved / Mention someone Closed
Duplicated by Redmine - Feature #29471: Allow for calling users by their username Closed

History

#1 Updated by Jelle Bekker over 6 years ago

I've tried to implement this at https://github.com/Jbekker/redmine_mention_plugin/tree/autocomplete
I changed the syntax to :user instead of @user because that doesn't get triggered when typing a email-address :-( I'm sure there is a way to filter a email adress out but im not a Ruby/JavaScript pro yet.
Currently im not checking if jquery is loaded and there are a few other things that could be done better I suppose. Patches and pull requests are welcome!

#2 Updated by Arkhitech - More, Better, Faster! over 5 years ago

+1 for this feature. Mentioned user should not get added to the watcher's list though. Only a one time email should be triggered saying that 'You were mentioned....' or something. Also, there should be email notification setting, where you can appropriately adjust that you want to receive mention email notifications only, etc.

#3 Updated by Toshi MARUYAMA over 5 years ago

  • Related to Feature #16478: Several people involved / Mention someone added

#4 Updated by Andriy Lesyuk over 5 years ago

FYI, mentions with email notifications are implemented in WikiNG 1.0.0b.

#5 Updated by Toshi MARUYAMA over 5 years ago

#6 Updated by Toshi MARUYAMA over 5 years ago

  • Related to deleted (Feature #16478: Several people involved / Mention someone)

#7 Updated by Toshi MARUYAMA over 5 years ago

  • Duplicated by Feature #16478: Several people involved / Mention someone added

#8 Updated by Dmitry Beloglazov over 5 years ago

+1 for this one. Would be really nice to have.

#10 Updated by Lai Wei-Hwa about 4 years ago

The plugin that Alex Sherman posted is cool but doesn't work on comments. +1 to get this implemented.

#11 Updated by Kamil Franckiewicz almost 4 years ago

Arkhitech - More, Better, Faster! wrote:

+1 for this feature. Mentioned user should not get added to the watcher's list though. Only a one time email should be triggered saying that 'You were mentioned....' or something. Also, there should be email notification setting, where you can appropriately adjust that you want to receive mention email notifications only, etc.

I agree. +1

#12 Updated by budo kaiman over 3 years ago

+1 to single email. Plugins for this feature have always been unreliable and trying to communicate on redmine without setting people as watchers is awkward and inefficient.

#13 Updated by Konstantin Ladutenko over 3 years ago

Lai Wei-Hwa wrote:

The plugin that Alex Sherman posted is cool but doesn't work on comments. +1 to get this implemented.

Alex Sherman wrote:

+1
I also tried this one: http://www.redmine.org/plugins/redmine-mentions

I used the same plugin by Arkhitech, it looks to work as expected for comments, however, does not notify user when mentioned in description of the task. To make autocomplete feature to work with redmine 2.5.2 I used a patch (see pull requtest on GitHub https://github.com/arkhitech/redmine_mentions/pull/34 )

#14 Updated by Steve Légaré over 3 years ago

Arkhitech - More, Better, Faster! wrote:

+1 for this feature. Mentioned user should not get added to the watcher's list though. Only a one time email should be triggered saying that 'You were mentioned....' or something. Also, there should be email notification setting, where you can appropriately adjust that you want to receive mention email notifications only, etc.

I agree! +1

#15 Updated by Anh Le Giang about 3 years ago

+ 1

#16 Updated by sch uess almost 3 years ago

+1

#17 Updated by Frank Paaske almost 3 years ago

Yes, please add this feature!

#18 Updated by Y Z almost 3 years ago

+1

#19 Updated by Roman Kovtyukh over 2 years ago

+1

#20 Updated by Toshi MARUYAMA about 2 years ago

#21 Updated by Yasukazu Nagatomi about 2 years ago

I agree! +1

#22 Updated by Joe Price about 2 years ago

+1 Keep the dream alive!

#23 Updated by Alexandre Audige about 2 years ago

+1

#24 Updated by C F over 1 year ago

+1

#25 Updated by Kevin Palm over 1 year ago

+1

#26 Updated by Aleksei Trubnikov over 1 year ago

+1

#27 Updated by sebastien lemaitre over 1 year ago

+1

#28 Updated by Maickel Neitzke about 1 year ago

+1

#29 Updated by Kamil . about 1 year ago

+1

#30 Updated by Go MAEDA about 1 year ago

  • Duplicated by Feature #29471: Allow for calling users by their username added

#31 Updated by Anonymous 10 months ago

+1

#32 Updated by Tantic o 9 months ago

+1

#33 Updated by Muhammad Yusuf 8 months ago

+1

#34 Updated by Mizuki ISHIKAWA 7 months ago

The attached patch adds a feature to mention to the user.
  • Use user link such as "user:jsmith" "@jsmith" "user#2".
  • Notify when the user mentioned by the user link has the authority to view the element and has not rejected the notification.

The test has not been written yet for this patch.
There is room for improvement in this patch.
I'm looking forward to getting your feedback.

#35 Updated by Yuuki NARA 7 months ago

+1

#36 Updated by Go MAEDA 7 months ago

  • Category changed from Core Plugins to Email notifications
  • Target version set to Candidate for next major release

#37 Updated by Mizuki ISHIKAWA 7 months ago

I attached a patch to which test code was added.

#38 Updated by Go MAEDA 6 months ago

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

Setting the target version to 4.1.0.

#39 Updated by Marius BALTEANU 6 months ago

  • Assignee set to Marius BALTEANU

I would like to test the solution proposed because looking over the patch proposed, I think that it cannot be committed as it is and it'll require more work.

#40 Updated by Aleksandar Pavic 5 months ago

+1

Mention should actually trigger email notification (add user as watcher if it's not added)

#41 Updated by John Ramsden 5 months ago

We've been looking at this feature, and we're hoping to move from to it from the redmine_mention_plugin plugin1. The issue we're having with the current plugin is that it doesn't support our usernames that are emails. Are there any plans to support that in this feature? Or if we plan to use this feature should we move away from emails as usernames?

In the existing plugin when we write @, an autocomplete box opens, when we choose a user that is not an email, it converts it to a link to the user correctly, whereas when using an email it does not. We tried modifying the regex but I guess there's more to it than that.

1 https://github.com/stpl/redmine_mention_plugin

#42 Updated by Go MAEDA 5 months ago

Marius BALTEANU wrote:

I would like to test the solution proposed because looking over the patch proposed, I think that it cannot be committed as it is and it'll require more work.

Could you point out what needs to be corrected? Maybe Mizuki can work on correcting the patch.

#43 Updated by Marius BALTEANU 4 months ago

Thanks Mizuki for writing the patch.

My main concern regarding the proposed solution is that there is no way for the user to control the notification emails, he'll be notified every time when someone will mention him.

I see 2 options:
1. We add a new event type ("On mention") and some options for the user to control when he should be notified or not. But this solution it's quite complex and it'll require more time to work on it. Also, the message from the notification emails should contain something like "You received this email because someone mentioned you".
2. We just add the user as watcher and the notifications will be controlled by the actual notification rules. In addition, we can add in the user preferences an option regarding if he wants to auto watch the objects where he is mentioned.

My proposal is to go with 2 for now and see in the future how can develop more this feature.

Anyway, another main improvement here is to have a client side feature to allow users to mention someone using an autocomplete dropdown.

Any other feedback on this is welcome.

#44 Updated by Anders Thomsen 4 months ago

Marius BALTEANU wrote:

...
My main concern regarding the proposed solution is that there is no way for the user to control the notification emails, he'll be notified every time when someone will mention him.
...
I see 2 options:
...
2. We just add the user as watcher and the notifications will be controlled by the actual notification rules. In addition, we can add in the user preferences an option regarding if he wants to auto watch the objects where he is mentioned.

Won't adding mentioned users as watchers cause them to get even more e-mails? Consider a scenario where developers (watching the issue) frequently adds notes to an issue. Once in a while they need to notify some stakeholder (not watching as this would cause too many irrelevant notifications) which they do by mentioning them.
Or perhaps I misunderstand - by "add the user as watcher" do you mean only for that one request (not persisting the setting)?

#45 Updated by Marius BALTEANU 4 months ago

Anders Thomsen wrote:

Won't adding mentioned users as watchers cause them to get even more e-mails? Consider a scenario where developers (watching the issue) frequently adds notes to an issue. Once in a while they need to notify some stakeholder (not watching as this would cause too many irrelevant notifications) which they do by mentioning them.
Or perhaps I misunderstand - by "add the user as watcher" do you mean only for that one request (not persisting the setting)?

You're right, it'll generate more emails.

How do you see the implementation?

#46 Updated by Anders Thomsen 4 months ago

In a company there should be no problem as mentioning a user would have the same effect as sending an email to the user. So I believe the main concern would be in public websites like this one.

It could be controlled by a new permission: "Notify mentioned users". If one don't have that permission, no drop-down should be displayed typing in @ and of cause no notification e-mail should be sent.

#47 Updated by Go MAEDA 4 months ago

Marius BALTEANU wrote:

My main concern regarding the proposed solution is that there is no way for the user to control the notification emails, he'll be notified every time when someone will mention him.

I think it is the ideal behavior because this feature is to forcefully send a notification to another user. Since the notification is sent only when a user used "@login" or other special markup, I think it is not a big problem.

#48 Updated by Jean-Philippe Lang 4 months ago

  • Target version changed from 4.1.0 to 4.2.0

#49 Updated by Mizuki ISHIKAWA 3 months ago

I agree with #13919#note-47.

http://www.redmine.org/projects/redmine/repository/entry/trunk/app/models/user.rb#L790
always send to project members except when mail_notification is set to 'none'

If mail_notification is not none, a notification will be sent when the news is created(#4700).

I think that notifications when mentioned are as important as news notifications.

#50 Updated by Go MAEDA about 1 month ago

  • Related to Patch #31989: Inline issue auto complete (#) in fields with text-formatting enabled added

#51 Updated by Marius BALTEANU about 1 month ago

@Mizuki ISHIKAWA, what do you think if we try to implement this feature using a new plugin named "acts_as_mentionable" which will be able to look for mentioned users (for now, it can be extended to another entities in the future) only on the changed values and only on configured attributes per entity (for example: Issue#description, Journal#notes, CustomFieldValue#value, etc)?

I'm attaching a patch for demo purposes which:
- gives you access to all attributes that are changed during an update using saved_changes
- gives you access to the attributes where we should look after mentions through mentionable_attributes

Further more, I think we should have a mechanism that calculates the users that should be notified by making a diff between the users that were been notified based on the old value and the users that should be notified based on the new value. In this way, we avoid sending another mention if someone just append a short text to an existing description which already contains a mention. Also, the email send to the user should be a new mail template, something like "You have been mentioned in #{issue} by #{user}".

Please let me know what do you think about this. Any other ideas are welcome!

#52 Updated by Mizuki ISHIKAWA about 1 month ago

Marius BALTEANU wrote:

Please let me know what do you think about this.

Thank you for your activity on this Issue(feature)!
The implementation using the "acts_as_mentionable" plugin looks more beautiful than the patch implementation I attached in #13919#note-34.

Also, the email send to the user should be a new mail template, something like "You have been mentioned in #{issue} by #{user}".

That looks good.

If the mention user is always notified of changes to mentionable attribute(eg issue),
I think it would be ideal to send only the email "You have been mentioned in #{issue} by #{user}". (Do not send existing email "Issue#1 has been updated by #{user}")

#53 Updated by Marius BALTEANU about 1 month ago

Mizuki ISHIKAWA wrote:

Thank you for your activity on this Issue(feature)!
The implementation using the "acts_as_mentionable" plugin looks more beautiful than the patch implementation I attached in #13919#note-34.

Thanks for you quick feedback. Do you like to continue from here? I would be very happy to review the patch.

Also available in: Atom PDF