プロジェクト

全般

プロフィール

Vote #76383

完了

Raise time entries comments limit to 1024

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
低め
担当者:
-
カテゴリ:
Time tracking_13
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
13
version_id:
102
issue_org_id:
19885
author_id:
128151
assigned_to_id:
1
comments:
11
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

See: source:/trunk/app/models/time_entry.rb#L42

The @comments@ field in the @time_entries@ table is defined as having a length of 1024 characters:

Click to expand @time_entries@ table definition...

Yet, user comments are truncated at 255:

Click to expand patch...

Let's not do that. :)

Note: This patch (partly) makes the comment field mandatory. That might not be what you want. It would be nice to have a way to require this field without patching the application though. :)


journals

--------------------------------------------------------------------------------
Here is a patch for source:/trunk/app/views/timelog/_form.html.erb as well:

{{collapse(Click to expand patch...)
<pre>
<code class="diff">
--- app/views/timelog/_form.html.erb.orig 2015-05-17 13:01:37.000000000 -0400
+++ app/views/timelog/_form.html.erb 2015-05-19 13:45:35.876821092 -0400
@@ -17,7 +17,7 @@
</p>
<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
<p><%= f.text_field :hours, :size => 6, :required => true %></p>
- <p><%= f.text_field :comments, :size => 100, :maxlength => 255 %></p>
+ <p><%= f.text_field :comments, :size => 100, :required => true, :maxlength => 1024 %></p>
<p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
<% @time_entry.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :time_entry, value %></p>
</code>
</pre>
}}

Again, noting that we're making the field mandatory, which might not be what you want (POLA(point of least authority)).
--------------------------------------------------------------------------------
"comments" of "time_entries" is defined as 255.
source:tags/3.0.3/db/migrate/032_create_time_entries.rb#L8

I think you changed manually.
--------------------------------------------------------------------------------
Yes, you are correct. We did. Can that field be made longer by default? The length of 255 characters is rather short and doesn't allow for detailed time entries.
--------------------------------------------------------------------------------
See r4402.
--------------------------------------------------------------------------------
The diff you referenced doesn't apply to the time entries @comment@ field.
--------------------------------------------------------------------------------
If you want to modify db definition, you need to make db migrate file.
* source:trunk/db/migrate/20101114115114_change_projects_name_limit.rb
* source:trunk/db/migrate/20101114115359_change_projects_identifier_limit.rb
--------------------------------------------------------------------------------
Yes, I understand that and we've done it. The point is that the stock password length between what the view allows and what the DB allows, by default, don't match. Thus, these comments get limited unnecessarily. Same deal for #19886. Please, apply these patches in this issue and #19886.
--------------------------------------------------------------------------------
Because there is no completed patch, I change tracker.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Limit raised to 1024 in r14621.
--------------------------------------------------------------------------------


related_issues

copied_to,Closed,19886,Raise wiki edits comments limit to 1024

Admin Redmine さんが約4年前に更新

  • カテゴリTime tracking_13 にセット
  • 対象バージョン3.2.0_102 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0