Feature #31444

Add "<< me >>" option to user format issue custom fields

Added by Go MAEDA 5 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Custom fields
Target version:4.1.0
Resolution:Fixed

Description

Currently, user format custom fields list member of the project, but "<< me >>" option which you can see in the Assignee field is not included in the list.

I think custom fields should have "<< me >>" option like the Assignee field for better usability and UI consistency.

feature-31444.patch Magnifier (3.65 KB) Mizuki ISHIKAWA, 2019-05-28 08:56

result.png (123 KB) Mizuki ISHIKAWA, 2019-05-28 08:59

Associated revisions

Revision 18288
Added by Jean-Philippe Lang 4 months ago

Add "<< me >>" option to user format issue custom fields (#31444).

Patch by Mizuki ISHIKAWA.

Revision 18302
Added by Jean-Philippe Lang 4 months ago

Test failure (#31444).

History

#1 Updated by Mizuki ISHIKAWA 5 months ago

I attached a patch to add this feature.
Add "<< me >>" only when login user is included in the options.

#2 Updated by Go MAEDA 5 months ago

  • Target version set to 4.1.0

LGTM. Setting the target version to 4.1.0.

#3 Updated by akitani ryo 5 months ago

confirmed.
I think there is no problem.

#4 Updated by Mizuki ISHIKAWA 4 months ago

akitani ryo wrote:

confirmed.
I think there is no problem.

Thank you for confirming!

#5 Updated by Jean-Philippe Lang 4 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Committed, thanks.

#6 Updated by Go MAEDA 4 months ago

  • Status changed from Closed to Reopened

The test fails randomly.

Failure:
Redmine::UserFieldFormatTest#test_possible_values_options_should_return_project_members_and_me_if_logged_in [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/sqlite3/RUBY_VER/ruby-2.6/test/unit/lib/redmine/field_format/user_field_format_test.rb:89]:
--- expected
+++ actual
@@ -1 +1 @@
-["<< me >>", "Dave Lopper", "John Smith"]
+["<< moi >>", "Dave Lopper", "John Smith"]

bin/rails test test/unit/lib/redmine/field_format/user_field_format_test.rb:84

It can be fixed with the following patch.

Index: test/unit/lib/redmine/field_format/user_field_format_test.rb
===================================================================
--- test/unit/lib/redmine/field_format/user_field_format_test.rb    (リビジョン 18300)
+++ test/unit/lib/redmine/field_format/user_field_format_test.rb    (作業コピー)
@@ -82,6 +82,7 @@
   end

   def test_possible_values_options_should_return_project_members_and_me_if_logged_in
+    ::I18n.locale = 'en'
     User.current = User.find(2)
     field = IssueCustomField.new(:field_format => 'user')
     project = Project.find(1)

#7 Updated by Jean-Philippe Lang 4 months ago

  • Status changed from Reopened to Closed

Committed, thanks.

Also available in: Atom PDF