Vote #80452
完了Unreliable User mention feature with PostgreSQL
0%
説明
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!
journals
The current version of Redmine does not have a mentioning feature. Are you talking about a plugin that provides the feature?
--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
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|
|/3. Yamada, Taro|/3. tyamada
(all are lowercases)|@tyamada|Linked|
|@TYamada|/2. NG|
|@TYAMADA|
|/3. Yamada, Hanako|/3. HYamada
(H and Y are uppercases)|@HYamada|/3. NG|
|@hyamada|
|@HYAMADA|
|/3. John Smith|/3. JSMITH
(all are uppercases)|@jsmith|/3. 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...
--------------------------------------------------------------------------------
Danke schön, Holger!
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
@Kenta 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_issues
duplicates,Closed,26892,Link to user in wiki syntax only works when login is written in lower case