Project

General

Profile

Time log improvements

Added by Piotr Grondziowski over 1 year ago

Time logging using post-it is very useful. Some improvements proposals, all in file app\views\scrum\_create_time_entry.html.erb:
  1. Date field could use calendar
    line 19
          <%= f.text_field :spent_on, :size => 10, :value => Date.today, :required => true %>
    
    should be replaced by
          <%= f.date_field :spent_on, :size => 10, :value => Date.today, :required => true %>
    
  2. Comment field could respect system setting
    line 24
          <%= f.text_field :comments, :size => 15, :maxlength => 255 %>
    
    should be replaced by
          <%= f.text_field :comments, :size => 15, :maxlength => 255, :required => Setting.timelog_required_fields.include?('comments') %>
    
  3. Activity field could require choice (no default value)
    line 31
                        :required => true %>
    
    should be replaced by
                        { prompt: "--- #{l(:actionview_instancetag_blank_option)} ---" },
                        { required: true } %>
    
  4. User field can have me as a default value
    line 31
                        principals_options_for_select(@issue.assignable_users, @issue.assigned_to),
    
    should be replaced by
                        principals_options_for_select(@issue.assignable_users, 0),
    

Effect: