Feature #1875
openIssue filtering on author only uses members of project
0%
Description
We allow non-members of project to add issues and hence they are then authors of the issues they create. The issue filter query only gathers users/authors who are members of the project hence our list of authors to query on is incomplete.
# members of the user's projects user_values += User.current.projects.collect(&:users).flatten.uniq.sort.collect{|s| [s.name, s.id.to_s] }
Not sure what the best way to fix/address this is...
Related issues
Updated by Jean-Philippe Lang over 16 years ago
I have this issue here too. I'd like to see tickets submitted by any user.
But loading thousands of users in the drop-down is not a good solution.
This would require some changes in the Query model and to replace the field with a sort of auto-complete field.
Updated by Jean-Philippe Lang over 16 years ago
If displaying the list of all users is not a problem for you, you can use:
user_values += User.find(:all).sort.collect{|s| [s.name, s.id.to_s] }
Updated by Jan Niggemann (redmine.org team member) over 12 years ago
jp jp: Where would I use that?
Updated by Cheyenne Wills over 12 years ago
Understand about the size of the list. Maybe a option setting?
I think you can limit the size of the list by using just those userids that are in the issues for the project/tracker (still could be thousands for a internet wide "public" project)
Updated by Daniel Felix almost 12 years ago
- Affected version (unused) changed from 0.7.3 to 2.2.2
- Affected version changed from 0.7.3 to 2.2.2
Still able to use see this.
Maybe this could be changed with a simple project setting.
For example:allow ticket assignment to:
- only project members
- project members + author
- systemwide members (which implies, that assigned to should be a input field with autocomplete, because the list will be too large)
What do you think about this suggestion?
Updated by Toshi MARUYAMA about 9 years ago
- Tracker changed from Defect to Feature
Updated by Toshi MARUYAMA about 9 years ago
- Has duplicate Feature #4398: Author Issue-filter only contains members even when non-members have 'create issue' permission added
Updated by Toshi MARUYAMA about 9 years ago
FTR:
Jean-Philippe Lang wrote at #4398#note-1:
We can not list all users in this field, we need to change this filter to an auto-complete field first.
Updated by Alexey Poliansky about 9 years ago
issues_query.rb
173c177,187 < author_values += users.collect{|s| [s.name, s.id.to_s] } --- > if project > from_user = [] > project.issues.group(:author_id).each{|i| from_user << [i.author.name, i.author_id.to_s]} > from_user.uniq! > from_user.sort! > author_values += from_user > else > author_values += users.collect{|s| [s.name, s.id.to_s] } > end
this way works but slow when big amount of issues
(After adding group(:author_id) - works much faster)
Updated by Alexey Poliansky about 9 years ago
173c174,182 < author_values += users.collect{|s| [s.name, s.id.to_s] } --- > if project > time_range = (Time.now - (3600*24*180))..(Time.now) > author_values += project.issues.where(issues: { created_on: time_range }).group(:author_id).preload(:author).collect{|s| [s.author.name, s.author_id.to_s]} > author_values.sort! > else > author_values += users.collect{|s| [s.name, s.id.to_s] } > end
Another version to work in workflow project, select only authors in last half-year tasks
Updated by Go MAEDA about 7 years ago
- Category changed from Issues to Issues filter
Updated by Go MAEDA about 7 years ago
- Has duplicate Defect #21075: User without role in project is not shown as a selection option in Author filter (Issues tab) added
Updated by Sebastian Paluch about 3 years ago
+1
This is long waited and reported multiple times. Any chance to get this done?
Updated by Alexey Poliansky almost 3 years ago
Another try to solve this issue. for me it's work fine for about 250 active users.
in issue_query.rb after author_values=[]
if project from_user = [] time_range = (Time.now - (3600*24*730))..(Time.now) issues_cross = Issue.cross_project_scope(project, 'descendants') from_user += issues_cross.where(issues: { created_on: time_range }).group(:author_id).preload(:author).collect{|i| [i.author.name, i.author_id.to_s]} from_user.uniq! from_user.sort! author_values += from_user
time_range not required but for me a little helpful...