Feature #1875

Issue filtering on author only uses members of project

Added by James Turnbull about 10 years ago. Updated 12 months ago.

Status:NewStart date:2008-09-09
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues filter
Target version:-
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

Duplicated by Redmine - Feature #11606: Filter on Author should include all Authors in the issue ... Closed
Duplicated by Redmine - Feature #4398: Author Issue-filter only contains members even when non-m... Closed 2009-12-14
Duplicated by Redmine - Defect #21075: User without role in project is not shown as a selection ... Closed

History

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

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

#3 Updated by Jan Niggemann (redmine.org team member) about 6 years ago

@JPL: Where would I use that?

#4 Updated by Cheyenne Wills about 6 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)

#5 Updated by Daniel Felix over 5 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?

#6 Updated by Toshi MARUYAMA almost 3 years ago

  • Tracker changed from Defect to Feature

#7 Updated by Toshi MARUYAMA almost 3 years ago

  • Duplicated by Feature #4398: Author Issue-filter only contains members even when non-members have 'create issue' permission added

#8 Updated by Toshi MARUYAMA almost 3 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.

#9 Updated by Alexey Poliansky almost 3 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)

#10 Updated by Alexey Poliansky almost 3 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

#11 Updated by Go MAEDA 12 months ago

  • Category changed from Issues to Issues filter

#12 Updated by Go MAEDA 12 months ago

  • Duplicated by Defect #21075: User without role in project is not shown as a selection option in Author filter (Issues tab) added

Also available in: Atom PDF