Project

General

Profile

Actions

Feature #2464

closed

Add placeholder "h:mm" to hours field for better user guidance

Added by Maxim Krušina almost 16 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Start date:
2009-01-08
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

It will be very hardy to have some short pop-up help near "Spent-time" box.
It's hard to remember exact format of time.


Files

clipboard-202408191639-tajgz.png (21.4 KB) clipboard-202408191639-tajgz.png Go MAEDA, 2024-08-19 09:39
2464.patch (1.26 KB) 2464.patch Go MAEDA, 2024-08-19 10:16
Actions #1

Updated by Eric Davis almost 16 years ago

  • Category set to UI

+1 I agree, I get a lot of "bug" reports from people entering time incorrectly

Actions #2

Updated by Benjamin Schunn over 8 years ago

is this needed anymore? imho no.

Actions #3

Updated by Toshi MARUYAMA over 8 years ago

  • Description updated (diff)
Actions #4

Updated by Go MAEDA 4 months ago

I would like to propose adding a placeholder of "h:mm" in the hours field to indicate the expected time format. While Redmine supports various time entry formats, “h:mm” is certainly the most common. Displaying this format as a placeholder could help users understand the expected input more easily and improve overall usability.

This can be implemented with the following change:

diff --git a/lib/redmine/views/labelled_form_builder.rb b/lib/redmine/views/labelled_form_builder.rb
index 8c97b8215..f364ca8e2 100644
--- a/lib/redmine/views/labelled_form_builder.rb
+++ b/lib/redmine/views/labelled_form_builder.rb
@@ -49,6 +49,7 @@ class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder
     # display the value before type cast when the entered value is not valid
     if @object.errors[field].blank?
       options = options.merge(:value => format_hours(@object.send field))
+                       .with_defaults(:placeholder => 'h:mm')
     end
     text_field field, options
   end

Actions #5

Updated by Go MAEDA 4 months ago

Actions #6

Updated by Go MAEDA 4 months ago

  • Target version changed from Candidate for next major release to 6.0.0

Setting the target version to 6.0.0.

Actions #7

Updated by Go MAEDA 4 months ago

  • Subject changed from Add textual help to "spent time" field and fix errors to Add placeholder "h:mm" to hours field for better user guidance
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r22977.

Actions

Also available in: Atom PDF