Feature #16904

Add anonymous user to author list in issue query

Added by Felix Schäfer over 5 years ago. Updated 12 months ago.

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


Category:Issues filter
Target version:Candidate for next major release


The author of an issue might be "Anonymous", either because issue creation is allowed for users that are not logged in, or because a user has been deleted. There's currently no way to filter by that user, the only way to achieve this is to filter for issues with an author that "is not all users".

16904-issuequery-filters-add-anonymous-user.patch Magnifier (1.91 KB) Yuichi HARADA, 2018-10-04 05:02

16904-issuequery-filters-add-anonymous-user-v2.patch Magnifier (1.34 KB) Go MAEDA, 2018-11-03 08:38


#1 Updated by Felix Schäfer over 5 years ago

This adds the option to search for issues with the author "Anonymous" everywhere.

diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index bf90f56..1b9bf1e 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -171,6 +171,7 @@ class IssueQuery < Query
     author_values = []
     author_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged?
     author_values += users.collect{|s| [s.name, s.id.to_s] }
+    author_values << [l(:label_user_anonymous), User.anonymous.id.to_s]
       :type => :list, :values => author_values
     ) unless author_values.empty?

#2 Updated by Deoren Moor almost 5 years ago


This would be useful to have. In addition (probably a separate issue), being able to filter on locked accounts would be nice to have as well.

#3 Updated by Go MAEDA about 1 year ago

  • Category set to Issues filter

#4 Updated by Yuichi HARADA about 1 year ago

I added an Anonymous user to the issues filter for "Author" and "Updated by" and "Last updated by".

#5 Updated by Go MAEDA about 1 year ago

  • Target version set to Candidate for next major release

#6 Updated by Go MAEDA 12 months ago

Thank you for writing the patch.

But I think that not only IssuesQuery but also TimeEntryQuery should have an anonymous user in the author list because the User value of time entries can be an anonymous user.

Also available in: Atom PDF