Defect #32382
closed
Unreliable User mention feature with PostgreSQL
Added by Kenta Kogumasaka about 5 years ago.
Updated over 4 years ago.
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!
The current version of Redmine does not have a mentioning feature. Are you talking about a plugin that provides the feature?
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.
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...
- Related to Defect #26892: Link to user in wiki syntax only works when login is written in lower case added
- Status changed from New to Needs feedback
test test Kogumasaka, this problem was fixed in Redmine 4.0, please see #26892 for more details.
Not being a very big change, maybe you can apply the fix on your instance.
- Related to deleted (Defect #26892: Link to user in wiki syntax only works when login is written in lower case)
- Is duplicate of Defect #26892: Link to user in wiki syntax only works when login is written in lower case added
- Status changed from Needs feedback to Closed
- Resolution set to Duplicate
Also available in: Atom
PDF