プロジェクト

全般

プロフィール

Vote #66744

未完了

Validate time entry hours based on a configurable regular expression

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Time tracking_13
対象バージョン:
-
開始日:
2010/03/05
期日:
進捗率:

0%

予定工数:
category_id:
13
version_id:
0
issue_org_id:
4989
author_id:
465
assigned_to_id:
0
comments:
3
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

"time_entry_hours input" should support Regular expression. eg:set time_entry_hours value less than 8 or other conditions.


journals

Perhaps the feature should be a part of #4316
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
li wei wrote:
> "time_entry_hours input" should support Regular expression. eg:set time_entry_hours value less than 8 or other conditions.

"app/models/time_entry.rb" replace 'hours >= 1000' by 'hours >= 8'
<pre><code class="ruby">
def validate
errors.add :hours, :invalid if hours && (hours < 0 || hours > 8) # replace hours >= 1000 by hours >= 8
errors.add :project_id, :invalid if project.nil?
errors.add :issue_id, :invalid if (issue_id && !issue) || (issue && project!=issue.project)
end
</code></pre>
--------------------------------------------------------------------------------

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

  • カテゴリTime tracking_13 にセット

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

いいね!0
いいね!0