Defect #32382
closedUnreliable User mention feature with PostgreSQL
0%
Description
Our Redmine system has been migrated to the new instance with PostgreSQL / Ubuntu 18, but we now observe that the User mention feature is unreliable.
The symptom is that accounts consisted of lowercase characters only can be found and mentioned, but ones with uppercase characters only / the combination of uppercase and lowercase cannot be mentioned. Both cases were fine with MySQL before migration.
Environment: Redmine version 3.4.11.stable Ruby version 2.4.6-p354 (2019-04-01) [x86_64-linux] Rails version 4.2.11.1 Environment production Database adapter PostgreSQL
Thank you for your help!
Related issues
Updated by Go MAEDA about 5 years ago
The current version of Redmine does not have a mentioning feature. Are you talking about a plugin that provides the feature?
Updated by Kenta Kogumasaka about 5 years ago
Hello Maeda San!
I don't think we've installed any plugin such as https://www.redmine.org/plugins/redmine-mentions. I found #4179#note-41 and #13919#note-37 that you have already been in a loop, and both patches look already implemented for master.
(See https://github.com/redmine/redmine/blob/master/app/helpers/application_helper.rb#L1134)
That's why I thought the feature has been already in production. What do you think?
Updated by Go MAEDA about 5 years ago
Kenta Kogumasaka wrote:
I don't think we've installed any plugin such as https://www.redmine.org/plugins/redmine-mentions. I found #4179#note-41 and #13919#note-37 that you have already been in a loop, and both patches look already implemented for master.
(See https://github.com/redmine/redmine/blob/master/app/helpers/application_helper.rb#L1134)
Thank you for the detailed information. I understood. My understanding is that "mention" means the link to user feature (#4179) and you cannot make a link to a user if you use uppercase characters. Is it correct?
Updated by Kenta Kogumasaka about 5 years ago
Yes, it's more or less correct. Strictly speaking, we cannot make a link to a user account that has uppercase character(s). Here is some examples:
Full name | Redmine Account (case-sensitive) |
Try | Result |
---|---|---|---|
Yamada, Taro | tyamada (all are lowercases) |
辰也 山田 | Linked |
辰也 山田 | NG | ||
辰也 山田 | |||
Yamada, Hanako | HYamada (H and Y are uppercases) |
@HYamada | NG |
@hyamada | |||
@HYAMADA | |||
John Smith | JSMITH (all are uppercases) |
@jsmith | NG |
@JSMITH | |||
@JSMith |
The accounts that consist of lowercases only can be linked if using @<username> with lowercases.
Thousands of accounts in our Redmine have been imported with LDAP Sync, and I don't feel it would be practical to replace all uppercases to lowercases in the "users" table.
Updated by Holger Just about 5 years ago
Instead of User.visible.where(:login => name, :type => 'User').first
, we should probably use User.visible.find_by_login(name)
to find the user in ApplictionHelper#parse_redmine_links
. Here, we already perform a fallback to a case-insensitive match if necessary.
Let me check if that does it...
Updated by Mischa The Evil about 5 years ago
- Related to Defect #26892: Link to user in wiki syntax only works when login is written in lower case added
Updated by Marius BĂLTEANU about 5 years ago
- Status changed from New to Needs feedback
Updated by Marius BĂLTEANU over 4 years ago
- Related to deleted (Defect #26892: Link to user in wiki syntax only works when login is written in lower case)
Updated by Marius BĂLTEANU over 4 years ago
- Is duplicate of Defect #26892: Link to user in wiki syntax only works when login is written in lower case added
Updated by Marius BĂLTEANU over 4 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Duplicate