Project

General

Profile

Actions

Defect #44431

open

mentions can't find a user

Added by Janusz Harkot 24 days ago. Updated 18 days ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Resolution:
Affected version:

Description

while using @ for the user mention, redmine can't match input after @ to a real user if number of project users is significant

main reason is that there is a logic flaw

WatchersController is defining users_for_mention method

logic is:

    if params[:q].blank? && @project.present?
      scope = @project.principals.assignable_watchers.limit(100)
    else
      scope = Principal.assignable_watchers.limit(10)
    end

that mean if you press @ in the issue text editor, first 10 users are being selected and then query filter is applied, so if you user is 11th on a list - there sill be an empty list

I suggest to not limit scope there, but after matching users to a query

Actions

Also available in: Atom PDF