Feature #16904

Add anonymous user to author list in issue query

Added by Felix Schäfer over 4 years ago. Updated 14 days ago.

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

0%

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

Description

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

History

#1 Updated by Felix Schäfer over 4 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]
     add_available_filter("author_id",
       :type => :list, :values => author_values
     ) unless author_values.empty?

#2 Updated by Deoren Moor about 4 years ago

+1

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 month ago

  • Category set to Issues filter

#4 Updated by Yuichi HARADA about 1 month 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 month ago

  • Target version set to Candidate for next major release

#6 Updated by Go MAEDA 14 days 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