Project

General

Profile

Actions

Defect #39553

closed

Mention notification is not sent (MENTION_PATTERN / LINKS_RE inconsistency)

Added by Thomas Löber about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Email notifications
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

When I add an issue comment

Hello @login!

where login is a valid login and there is no newline at the end of the comment, the mention is highlighted in the issue history, but no notification is sent to the user.

This is because both, Redmine::Acts::Mentionable::InstanceMethods::MENTION_PATTERN and ApplicationHelper::LINKS_RE, require a character after the exclamation mark, but only LINKS_RE (used in ApplicationHelper#parse_redmine_links) finds additional characters, namely the </p>, which is added earlier when the comment is converted to HTML.

MENTION_PATTERN should handle the case that [[:punct:]] is the at end of the string.

Thanks,
Thomas

Actions

Also available in: Atom PDF