Project

General

Profile

Actions

Feature #1875

open

Issue filtering on author only uses members of project

Added by James Turnbull about 16 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues filter
Target version:
-
Start date:
2008-09-09
Due date:
% Done:

0%

Estimated time:
Resolution:

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

Has duplicate Redmine - Feature #11606: Filter on Author should include all Authors in the issue list, not just members of the project.Closed

Actions
Has duplicate Redmine - Feature #4398: Author Issue-filter only contains members even when non-members have 'create issue' permissionClosed2009-12-14

Actions
Has duplicate Redmine - Defect #21075: User without role in project is not shown as a selection option in Author filter (Issues tab)Closed

Actions
Actions #1

Updated by Jean-Philippe Lang about 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.

Actions #2

Updated by Jean-Philippe Lang about 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] }
Actions #3

Updated by Jan Niggemann (redmine.org team member) over 12 years ago

jp jp: Where would I use that?

Actions #4

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)

Actions #5

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?

Actions #6

Updated by Toshi MARUYAMA about 9 years ago

  • Tracker changed from Defect to Feature
Actions #7

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
Actions #8

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.

Actions #9

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)

Actions #10

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
Actions #11

Updated by Go MAEDA about 7 years ago

  • Category changed from Issues to Issues filter
Actions #12

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
Actions #13

Updated by Sebastian Paluch almost 3 years ago

+1

This is long waited and reported multiple times. Any chance to get this done?

Actions #14

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...

Actions

Also available in: Atom PDF