From 2777ec9622c7c6dadefa7ba81f919c59605151e2 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 25 May 2023 15:52:42 +0800 Subject: [PATCH] * Rename recordEstimate to recordWorkhour. --- module/action/lang/de.php | 10 +++++----- module/action/lang/en.php | 10 +++++----- module/action/lang/fr.php | 10 +++++----- module/action/lang/vi.php | 8 ++++---- module/action/lang/zh-cn.php | 10 +++++----- module/action/lang/zh-tw.php | 10 +++++----- module/action/test/model/getrelatedfields.php | 6 +++--- module/task/control.php | 7 ++++--- .../{recordestimate.css => recordworkhour.css} | 0 ...cordestimate.en.css => recordworkhour.en.css} | 0 ...cordestimate.vi.css => recordworkhour.vi.css} | 0 ...timate.zh-cn.css => recordworkhour.zh-cn.css} | 0 ...timate.zh-tw.css => recordworkhour.zh-tw.css} | 0 .../js/{recordestimate.js => recordworkhour.js} | 0 module/task/model.php | 10 +++++----- module/task/tao.php | 3 --- module/task/test/model/isclickable.php | 8 ++++---- ...estimate.html.php => recordworkhour.html.php} | 0 module/upgrade/systemfiles.txt | 16 ++++++++-------- 19 files changed, 53 insertions(+), 55 deletions(-) rename module/task/css/{recordestimate.css => recordworkhour.css} (100%) rename module/task/css/{recordestimate.en.css => recordworkhour.en.css} (100%) rename module/task/css/{recordestimate.vi.css => recordworkhour.vi.css} (100%) rename module/task/css/{recordestimate.zh-cn.css => recordworkhour.zh-cn.css} (100%) rename module/task/css/{recordestimate.zh-tw.css => recordworkhour.zh-tw.css} (100%) rename module/task/js/{recordestimate.js => recordworkhour.js} (100%) rename module/task/view/{recordestimate.html.php => recordworkhour.html.php} (100%) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index 5214eafede..7b8597dee8 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -195,7 +195,7 @@ $lang->action->desc->started = '$date, gestartet von $actor $lang->action->desc->restarted = '$date, continued by $actor.' . "\n"; $lang->action->desc->delayed = '$date, zurückgestellt von $actor.' . "\n"; $lang->action->desc->suspended = '$date, ausgesetzt von $actor.' . "\n"; -$lang->action->desc->recordestimate = '$date, aufgenommen von $actor und hat $extra Stunden aufgebraucht.'; +$lang->action->desc->recordworkhour = '$date, aufgenommen von $actor und hat $extra Stunden aufgebraucht.'; $lang->action->desc->editestimate = '$date, $actor Stunden angepaast.'; $lang->action->desc->deleteestimate = '$date, $actor Stunden gelöscht.'; $lang->action->desc->canceled = '$date, abgebrochen von $actor.' . "\n"; @@ -345,7 +345,7 @@ $lang->action->label->subdividestory = "Decompose Story"; $lang->action->label->unlinkchildstory = "Unlink"; $lang->action->label->started = 'started '; $lang->action->label->restarted = 'continued '; -$lang->action->label->recordestimate = 'recorded '; +$lang->action->label->recordworkhour = 'recorded '; $lang->action->label->editestimate = 'edited '; $lang->action->label->canceled = 'cancelled '; $lang->action->label->finished = 'finished '; @@ -586,7 +586,7 @@ $lang->action->dynamicAction->task['assigned'] = 'Assign Task'; $lang->action->dynamicAction->task['confirmed'] = 'Confirm Task'; $lang->action->dynamicAction->task['started'] = 'Start Task'; $lang->action->dynamicAction->task['finished'] = 'Finish Task'; -$lang->action->dynamicAction->task['recordestimate'] = 'Add Estimates'; +$lang->action->dynamicAction->task['recordworkhour'] = 'Add Estimates'; $lang->action->dynamicAction->task['editestimate'] = 'Edit Estimates'; $lang->action->dynamicAction->task['deleteestimate'] = 'Delete Estimates'; $lang->action->dynamicAction->task['paused'] = 'Pause Task'; @@ -850,7 +850,7 @@ $lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->un $lang->action->search->label['linked2kanban'] = $lang->action->label->linked2kanban; $lang->action->search->label['started'] = $lang->action->label->started; $lang->action->search->label['restarted'] = $lang->action->label->restarted; -$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate; +$lang->action->search->label['recordworkhour'] = $lang->action->label->recordworkhour; $lang->action->search->label['editestimate'] = $lang->action->label->editestimate; $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; @@ -885,7 +885,7 @@ $lang->action->apiTitle->started = 'Started by $actoraction->apiTitle->restarted = 'Continued by $actor.'; $lang->action->apiTitle->delayed = 'Postponed by $actor.'; $lang->action->apiTitle->suspended = 'Suspended by $actor.'; -$lang->action->apiTitle->recordestimate = 'Recorded by $actor and it cost $extra hours.'; +$lang->action->apiTitle->recordworkhour = 'Recorded by $actor and it cost $extra hours.'; $lang->action->apiTitle->editestimate = '$actor edited Hour.'; $lang->action->apiTitle->deleteestimate = '$actor deleted Hour.'; $lang->action->apiTitle->canceled = 'Cancelled by $actor.'; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 4aada15413..c0f5506538 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -195,7 +195,7 @@ $lang->action->desc->started = '$date, started by $actoraction->desc->restarted = '$date, continued by $actor.' . "\n"; $lang->action->desc->delayed = '$date, postponed by $actor.' . "\n"; $lang->action->desc->suspended = '$date, suspended by $actor.' . "\n"; -$lang->action->desc->recordestimate = '$date, recorded by $actor and it cost $extra hours.'; +$lang->action->desc->recordworkhour = '$date, recorded by $actor and it cost $extra hours.'; $lang->action->desc->editestimate = '$date, $actor edited Hour.'; $lang->action->desc->deleteestimate = '$date, $actor deleted Hour.'; $lang->action->desc->canceled = '$date, cancelled by $actor.' . "\n"; @@ -345,7 +345,7 @@ $lang->action->label->subdividestory = "decomposed Story "; $lang->action->label->unlinkchildstory = "unlinked Story "; $lang->action->label->started = 'started '; $lang->action->label->restarted = 'continued '; -$lang->action->label->recordestimate = 'recorded '; +$lang->action->label->recordworkhour = 'recorded '; $lang->action->label->editestimate = 'edited '; $lang->action->label->canceled = 'cancelled '; $lang->action->label->finished = 'finished '; @@ -586,7 +586,7 @@ $lang->action->dynamicAction->task['assigned'] = 'Assign Task'; $lang->action->dynamicAction->task['confirmed'] = 'Confirm Task'; $lang->action->dynamicAction->task['started'] = 'Start Task'; $lang->action->dynamicAction->task['finished'] = 'Finish Task'; -$lang->action->dynamicAction->task['recordestimate'] = 'Add Estimates'; +$lang->action->dynamicAction->task['recordworkhour'] = 'Add Estimates'; $lang->action->dynamicAction->task['editestimate'] = 'Edit Estimates'; $lang->action->dynamicAction->task['deleteestimate'] = 'Delete Estimates'; $lang->action->dynamicAction->task['paused'] = 'Pause Task'; @@ -850,7 +850,7 @@ $lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->un $lang->action->search->label['linked2kanban'] = $lang->action->label->linked2kanban; $lang->action->search->label['started'] = $lang->action->label->started; $lang->action->search->label['restarted'] = $lang->action->label->restarted; -$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate; +$lang->action->search->label['recordworkhour'] = $lang->action->label->recordworkhour; $lang->action->search->label['editestimate'] = $lang->action->label->editestimate; $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; @@ -885,7 +885,7 @@ $lang->action->apiTitle->started = 'Started by $actoraction->apiTitle->restarted = 'Continued by $actor.'; $lang->action->apiTitle->delayed = 'Postponed by $actor.'; $lang->action->apiTitle->suspended = 'Suspended by $actor.'; -$lang->action->apiTitle->recordestimate = 'Recorded by $actor and it cost $extra hours.'; +$lang->action->apiTitle->recordworkhour = 'Recorded by $actor and it cost $extra hours.'; $lang->action->apiTitle->editestimate = '$actor edited Hour.'; $lang->action->apiTitle->deleteestimate = '$actor deleted Hour.'; $lang->action->apiTitle->canceled = 'Cancelled by $actor.'; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index 458690ad55..fd9d645fb0 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -195,7 +195,7 @@ $lang->action->desc->started = '$date, commencé par $actor $lang->action->desc->restarted = '$date, reprise par $actor.' . "\n"; $lang->action->desc->delayed = '$date, ajourné par $actor.' . "\n"; $lang->action->desc->suspended = '$date, suspendu par $actor.' . "\n"; -$lang->action->desc->recordestimate = '$date, enregistré par $actor et son coût est de $extra heures.'; +$lang->action->desc->recordworkhour = '$date, enregistré par $actor et son coût est de $extra heures.'; $lang->action->desc->editestimate = '$date, $actor a édité son temps estimé.'; $lang->action->desc->deleteestimate = '$date, $actor a supprimé son estimation de temps.'; $lang->action->desc->canceled = '$date, annulé par $actor.' . "\n"; @@ -345,7 +345,7 @@ $lang->action->label->subdividestory = "a décomposé la Story "; $lang->action->label->unlinkchildstory = "a dissocié de la Story fille "; $lang->action->label->started = 'a commencé '; $lang->action->label->restarted = 'a continué '; -$lang->action->label->recordestimate = 'a estimé '; +$lang->action->label->recordworkhour = 'a estimé '; $lang->action->label->editestimate = 'a réestimé '; $lang->action->label->canceled = 'a annulé '; $lang->action->label->finished = 'a fini '; @@ -586,7 +586,7 @@ $lang->action->dynamicAction->task['assigned'] = 'Assigner Tâche'; $lang->action->dynamicAction->task['confirmed'] = 'Confirmer Tâche'; $lang->action->dynamicAction->task['started'] = 'Commencer Tâche'; $lang->action->dynamicAction->task['finished'] = 'Terminer Tâche'; -$lang->action->dynamicAction->task['recordestimate'] = 'Ajouter Estimation'; +$lang->action->dynamicAction->task['recordworkhour'] = 'Ajouter Estimation'; $lang->action->dynamicAction->task['editestimate'] = 'Editer Estimation'; $lang->action->dynamicAction->task['deleteestimate'] = 'RAZ Estimation'; $lang->action->dynamicAction->task['paused'] = 'Stopper Tâche'; @@ -850,7 +850,7 @@ $lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->un $lang->action->search->label['linked2kanban'] = $lang->action->label->linked2kanban; $lang->action->search->label['started'] = $lang->action->label->started; $lang->action->search->label['restarted'] = $lang->action->label->restarted; -$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate; +$lang->action->search->label['recordworkhour'] = $lang->action->label->recordworkhour; $lang->action->search->label['editestimate'] = $lang->action->label->editestimate; $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; @@ -885,7 +885,7 @@ $lang->action->apiTitle->started = 'Started by $actoraction->apiTitle->restarted = 'Continued by $actor.'; $lang->action->apiTitle->delayed = 'Postponed by $actor.'; $lang->action->apiTitle->suspended = 'Suspended by $actor.'; -$lang->action->apiTitle->recordestimate = 'Recorded by $actor and it cost $extra hours.'; +$lang->action->apiTitle->recordworkhour = 'Recorded by $actor and it cost $extra hours.'; $lang->action->apiTitle->editestimate = '$actor edited Hour.'; $lang->action->apiTitle->deleteestimate = '$actor deleted Hour.'; $lang->action->apiTitle->canceled = 'Cancelled by $actor.'; diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index fcbf931b03..5f7b71cda8 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -159,7 +159,7 @@ $lang->action->desc->started = '$date, started by $actoraction->desc->restarted = '$date, continued by $actor.' . "\n"; $lang->action->desc->delayed = '$date, postponed by $actor.' . "\n"; $lang->action->desc->suspended = '$date, suspended by $actor.' . "\n"; -$lang->action->desc->recordestimate = '$date, ghi nhận bởi $actor and it cost $extra giờ.'; +$lang->action->desc->recordworkhour = '$date, ghi nhận bởi $actor and it cost $extra giờ.'; $lang->action->desc->editestimate = '$date, $actor edited Hour.'; $lang->action->desc->deleteestimate = '$date, $actor deleted Hour.'; $lang->action->desc->canceled = '$date, cancelled by $actor.' . "\n"; @@ -266,7 +266,7 @@ $lang->action->label->subdividestory = "decomposed Story "; $lang->action->label->unlinkchildstory = "hủy liên kết Story "; $lang->action->label->started = 'started '; $lang->action->label->restarted = 'continued '; -$lang->action->label->recordestimate = 'recorded '; +$lang->action->label->recordworkhour = 'recorded '; $lang->action->label->editestimate = 'edited '; $lang->action->label->canceled = 'cancelled '; $lang->action->label->finished = 'finished '; @@ -408,7 +408,7 @@ $lang->action->dynamicAction->task['assigned'] = 'Bàn giao nhiệm $lang->action->dynamicAction->task['confirmed'] = 'Xác nhận nhiệm vụ'; $lang->action->dynamicAction->task['started'] = 'Bắt đầu nhiệm vụ'; $lang->action->dynamicAction->task['finished'] = 'Nhiệm vụ hoàn thành'; -$lang->action->dynamicAction->task['recordestimate'] = 'Thêm dự tính'; +$lang->action->dynamicAction->task['recordworkhour'] = 'Thêm dự tính'; $lang->action->dynamicAction->task['editestimate'] = 'Sửa dự tính'; $lang->action->dynamicAction->task['deleteestimate'] = 'Xóa dự tính'; $lang->action->dynamicAction->task['paused'] = 'Pause nhiệm vụ'; @@ -650,7 +650,7 @@ $lang->action->search->label['linked2execution'] = $lang->action->label->li $lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->unlinkedfromexecution; $lang->action->search->label['started'] = $lang->action->label->started; $lang->action->search->label['restarted'] = $lang->action->label->restarted; -$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate; +$lang->action->search->label['recordworkhour'] = $lang->action->label->recordworkhour; $lang->action->search->label['editestimate'] = $lang->action->label->editestimate; $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 0335e8a451..037d1de11e 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -195,7 +195,7 @@ $lang->action->desc->started = '$date, 由 $actor $lang->action->desc->restarted = '$date, 由 $actor 继续。' . "\n"; $lang->action->desc->delayed = '$date, 由 $actor 延期。' . "\n"; $lang->action->desc->suspended = '$date, 由 $actor 挂起。' . "\n"; -$lang->action->desc->recordestimate = '$date, 由 $actor 记录工时,消耗 $extra 小时。'; +$lang->action->desc->recordworkhour = '$date, 由 $actor 记录工时,消耗 $extra 小时。'; $lang->action->desc->editestimate = '$date, 由 $actor 编辑工时。'; $lang->action->desc->deleteestimate = '$date, 由 $actor 删除工时。'; $lang->action->desc->canceled = '$date, 由 $actor 取消。' . "\n"; @@ -345,7 +345,7 @@ $lang->action->label->subdividestory = "细分了{$lang->SRCommon}"; $lang->action->label->unlinkchildstory = "移除了细分{$lang->SRCommon}"; $lang->action->label->started = '开始了'; $lang->action->label->restarted = '继续了'; -$lang->action->label->recordestimate = '记录了工时'; +$lang->action->label->recordworkhour = '记录了工时'; $lang->action->label->editestimate = '编辑了工时'; $lang->action->label->canceled = '取消了'; $lang->action->label->finished = '完成了'; @@ -586,7 +586,7 @@ $lang->action->dynamicAction->task['assigned'] = '指派任务'; $lang->action->dynamicAction->task['confirmed'] = "确认{$lang->SRCommon}变更"; $lang->action->dynamicAction->task['started'] = '开始任务'; $lang->action->dynamicAction->task['finished'] = '完成任务'; -$lang->action->dynamicAction->task['recordestimate'] = '记录工时'; +$lang->action->dynamicAction->task['recordworkhour'] = '记录工时'; $lang->action->dynamicAction->task['editestimate'] = '编辑工时'; $lang->action->dynamicAction->task['deleteestimate'] = '删除工时'; $lang->action->dynamicAction->task['paused'] = '暂停任务'; @@ -850,7 +850,7 @@ $lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->un $lang->action->search->label['linked2kanban'] = $lang->action->label->linked2kanban; $lang->action->search->label['started'] = $lang->action->label->started; $lang->action->search->label['restarted'] = $lang->action->label->restarted; -$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate; +$lang->action->search->label['recordworkhour'] = $lang->action->label->recordworkhour; $lang->action->search->label['editestimate'] = $lang->action->label->editestimate; $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; @@ -885,7 +885,7 @@ $lang->action->apiTitle->started = '启动。'; $lang->action->apiTitle->restarted = '继续。'; $lang->action->apiTitle->delayed = '执行了延期操作。'; $lang->action->apiTitle->suspended = '挂起。'; -$lang->action->apiTitle->recordestimate = '记录工时,消耗 %s 小时。'; +$lang->action->apiTitle->recordworkhour = '记录工时,消耗 %s 小时。'; $lang->action->apiTitle->editestimate = '编辑了工时。'; $lang->action->apiTitle->deleteestimate = '删除工时。'; $lang->action->apiTitle->canceled = '执行取消操作。'; diff --git a/module/action/lang/zh-tw.php b/module/action/lang/zh-tw.php index 717dc3fd9e..dd214ce2f1 100755 --- a/module/action/lang/zh-tw.php +++ b/module/action/lang/zh-tw.php @@ -172,7 +172,7 @@ $lang->action->desc->started = '$date, 由 $actor 啟 $lang->action->desc->restarted = '$date, 由 $actor 繼續。' . "\n"; $lang->action->desc->delayed = '$date, 由 $actor 延期。' . "\n"; $lang->action->desc->suspended = '$date, 由 $actor 掛起。' . "\n"; -$lang->action->desc->recordestimate = '$date, 由 $actor 記錄工時,消耗 $extra 小時。'; +$lang->action->desc->recordworkhour = '$date, 由 $actor 記錄工時,消耗 $extra 小時。'; $lang->action->desc->editestimate = '$date, 由 $actor 編輯工時。'; $lang->action->desc->deleteestimate = '$date, 由 $actor 刪除工時。'; $lang->action->desc->canceled = '$date, 由 $actor 取消。' . "\n"; @@ -271,7 +271,7 @@ $lang->action->label->subdividestory = "細分了{$lang->SRCommon}"; $lang->action->label->unlinkchildstory = "移除了細分{$lang->SRCommon}"; $lang->action->label->started = '開始了'; $lang->action->label->restarted = '繼續了'; -$lang->action->label->recordestimate = '記錄了工時'; +$lang->action->label->recordworkhour = '記錄了工時'; $lang->action->label->editestimate = '編輯了工時'; $lang->action->label->canceled = '取消了'; $lang->action->label->finished = '完成了'; @@ -458,7 +458,7 @@ $lang->action->dynamicAction->task['assigned'] = '指派任務'; $lang->action->dynamicAction->task['confirmed'] = "確認{$lang->SRCommon}變更"; $lang->action->dynamicAction->task['started'] = '開始任務'; $lang->action->dynamicAction->task['finished'] = '完成任務'; -$lang->action->dynamicAction->task['recordestimate'] = '記錄工時'; +$lang->action->dynamicAction->task['recordworkhour'] = '記錄工時'; $lang->action->dynamicAction->task['editestimate'] = '編輯工時'; $lang->action->dynamicAction->task['deleteestimate'] = '刪除工時'; $lang->action->dynamicAction->task['paused'] = '暫停任務'; @@ -665,7 +665,7 @@ $lang->action->search->label['linked2execution'] = $lang->action->label->li $lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->unlinkedfromexecution; $lang->action->search->label['started'] = $lang->action->label->started; $lang->action->search->label['restarted'] = $lang->action->label->restarted; -$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate; +$lang->action->search->label['recordworkhour'] = $lang->action->label->recordworkhour; $lang->action->search->label['editestimate'] = $lang->action->label->editestimate; $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; @@ -700,7 +700,7 @@ $lang->action->apiTitle->started = '啟動。'; $lang->action->apiTitle->restarted = '繼續。'; $lang->action->apiTitle->delayed = '執行了延期操作。'; $lang->action->apiTitle->suspended = '掛起。'; -$lang->action->apiTitle->recordestimate = '記錄工時,消耗 %s 小時。'; +$lang->action->apiTitle->recordworkhour = '記錄工時,消耗 %s 小時。'; $lang->action->apiTitle->editestimate = '編輯了工時。'; $lang->action->apiTitle->deleteestimate = '刪除工時。'; $lang->action->apiTitle->canceled = '執行取消操作。'; diff --git a/module/action/test/model/getrelatedfields.php b/module/action/test/model/getrelatedfields.php index 5e07a363c5..5c311346bd 100755 --- a/module/action/test/model/getrelatedfields.php +++ b/module/action/test/model/getrelatedfields.php @@ -36,7 +36,7 @@ pid=1 测试获取objectType product objectId 24 actionType restarted extra 1 的动态信息 >> ,24,;0;0 测试获取objectType story objectId 25 actionType delayed extra 1 的动态信息 >> ,7,;0;0 测试获取objectType productplan objectId 26 actionType suspended extra 1 的动态信息 >> ,9,;0;0 -测试获取objectType release objectId 1 actionType recordestimate extra 1 的动态信息 >> ,1,;11;0 +测试获取objectType release objectId 1 actionType recordworkhour extra 1 的动态信息 >> ,1,;11;0 测试获取objectType project objectId 28 actionType editestimate extra 33 的动态信息 >> ,8,18,98,;28;0 测试获取objectType task objectId 29 actionType deleteestimate extra 1 的动态信息 >> ,29,;39;129 测试获取objectType build objectId 1 actionType canceled extra 1 的动态信息 >> ,1,;11;0 @@ -53,7 +53,7 @@ pid=1 */ $objectType = array('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'bug', 'testcase', 'case', 'testtask', 'user', 'doc', 'doclib', 'todo', 'branch', 'module', 'testsuite', 'caselib', 'testreport', 'entry', 'webhook', 'review'); $objectId = array(1,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,1,28,29,1,31,32,33,1,35,36,37,38,39); -$actionType = array('common', 'extra', 'opened', 'created', 'changed', 'edited', 'assigned', 'closed', 'deleted', 'deletedfile', 'editfile', 'erased', 'undeleted', 'hidden', 'commented', 'activated', 'blocked', 'moved', 'confirmed', 'caseconfirmed', 'bugconfirmed', 'frombug', 'started', 'restarted', 'delayed', 'suspended', 'recordestimate', 'editestimate', 'deleteestimate', 'canceled', 'svncommited', 'gitcommited', 'finished', 'paused', 'verified', 'diff1', 'diff2', 'diff3', 'linked2bug'); +$actionType = array('common', 'extra', 'opened', 'created', 'changed', 'edited', 'assigned', 'closed', 'deleted', 'deletedfile', 'editfile', 'erased', 'undeleted', 'hidden', 'commented', 'activated', 'blocked', 'moved', 'confirmed', 'caseconfirmed', 'bugconfirmed', 'frombug', 'started', 'restarted', 'delayed', 'suspended', 'recordworkhour', 'editestimate', 'deleteestimate', 'canceled', 'svncommited', 'gitcommited', 'finished', 'paused', 'verified', 'diff1', 'diff2', 'diff3', 'linked2bug'); $extra = array('1', '1', '1', '1', '11', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '33', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'); $action = new actionTest(); @@ -84,7 +84,7 @@ r($action->getRelatedFieldsTest($objectType[22], $objectId[22], $actionType[22], r($action->getRelatedFieldsTest($objectType[0], $objectId[23], $actionType[23], $extra[23])) && p('product;project;execution') && e(',24,;0;0'); // 测试获取objectType product objectId 24 actionType restarted extra 1 的动态信息 r($action->getRelatedFieldsTest($objectType[1], $objectId[24], $actionType[24], $extra[24])) && p('product;project;execution') && e(',7,;0;0'); // 测试获取objectType story objectId 25 actionType delayed extra 1 的动态信息 r($action->getRelatedFieldsTest($objectType[2], $objectId[25], $actionType[25], $extra[25])) && p('product;project;execution') && e(',9,;0;0'); // 测试获取objectType productplan objectId 26 actionType suspended extra 1 的动态信息 -r($action->getRelatedFieldsTest($objectType[3], $objectId[26], $actionType[26], $extra[26])) && p('product;project;execution') && e(',1,;11;0'); // 测试获取objectType release objectId 1 actionType recordestimate extra 1 的动态信息 +r($action->getRelatedFieldsTest($objectType[3], $objectId[26], $actionType[26], $extra[26])) && p('product;project;execution') && e(',1,;11;0'); // 测试获取objectType release objectId 1 actionType recordworkhour extra 1 的动态信息 r($action->getRelatedFieldsTest($objectType[4], $objectId[27], $actionType[27], $extra[27])) && p('product;project;execution') && e(',8,18,98,;28;0'); // 测试获取objectType project objectId 28 actionType editestimate extra 33 的动态信息 r($action->getRelatedFieldsTest($objectType[5], $objectId[28], $actionType[28], $extra[28])) && p('product;project;execution') && e(',29,;39;129'); // 测试获取objectType task objectId 29 actionType deleteestimate extra 1 的动态信息 r($action->getRelatedFieldsTest($objectType[6], $objectId[29], $actionType[29], $extra[29])) && p('product;project;execution') && e(',1,;11;0'); // 测试获取objectType build objectId 1 actionType canceled extra 1 的动态信息 diff --git a/module/task/control.php b/module/task/control.php index b205d2e532..4d171b8eea 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -452,7 +452,8 @@ class task extends control } /** - * Record consumed and estimate. + * 任务查看工时/新增工时的方法。 + * View and add task's effort. * * @param int $taskID * @param string $from @@ -460,7 +461,7 @@ class task extends control * @access public * @return void */ - public function recordWorkhour($taskID, $from = '', $orderBy = '') + public function recordWorkhour(int $taskID, string $from = '', string $orderBy = '') { $this->taskZen->commonAction($taskID); @@ -538,7 +539,7 @@ class task extends control /* Set the fold state of the current task. */ $referer = strtolower($_SERVER['HTTP_REFERER']); - if(strpos($referer, 'recordestimate') and $this->cookie->taskEffortFold !== false) + if(strpos($referer, 'recordworkhour') and $this->cookie->taskEffortFold !== false) { $taskEffortFold = $this->cookie->taskEffortFold; } diff --git a/module/task/css/recordestimate.css b/module/task/css/recordworkhour.css similarity index 100% rename from module/task/css/recordestimate.css rename to module/task/css/recordworkhour.css diff --git a/module/task/css/recordestimate.en.css b/module/task/css/recordworkhour.en.css similarity index 100% rename from module/task/css/recordestimate.en.css rename to module/task/css/recordworkhour.en.css diff --git a/module/task/css/recordestimate.vi.css b/module/task/css/recordworkhour.vi.css similarity index 100% rename from module/task/css/recordestimate.vi.css rename to module/task/css/recordworkhour.vi.css diff --git a/module/task/css/recordestimate.zh-cn.css b/module/task/css/recordworkhour.zh-cn.css similarity index 100% rename from module/task/css/recordestimate.zh-cn.css rename to module/task/css/recordworkhour.zh-cn.css diff --git a/module/task/css/recordestimate.zh-tw.css b/module/task/css/recordworkhour.zh-tw.css similarity index 100% rename from module/task/css/recordestimate.zh-tw.css rename to module/task/css/recordworkhour.zh-tw.css diff --git a/module/task/js/recordestimate.js b/module/task/js/recordworkhour.js similarity index 100% rename from module/task/js/recordestimate.js rename to module/task/js/recordworkhour.js diff --git a/module/task/model.php b/module/task/model.php index 046c854ca1..3659c4a123 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1306,15 +1306,15 @@ class taskModel extends model * Record workhour and left of task. * * @param int $taskID - * @param array $workhour + * @param object $workhour * @access public * @return array */ - public function recordWorkhour(int $taskID, array $workhour) + public function recordWorkhour(int $taskID, object $workhour) { - $workhour = fixer::input('post')->get(); - $today = helper::today(); + $today = helper::today(); + a($workhour);die; /* Fix bug#3036. */ foreach($workhour->consumed as $id => $item) $workhour->consumed[$id] = trim($item); foreach($workhour->consumed as $id => $item) @@ -2834,7 +2834,7 @@ class taskModel extends model if($action == 'close' and $task->parent < 0) return false; if($action == 'batchcreate' and !empty($task->team)) return false; if($action == 'batchcreate' and $task->parent > 0) return false; - if($action == 'recordestimate' and $task->parent == -1) return false; + if($action == 'recordworkhour' and $task->parent == -1) return false; if($action == 'delete' and $task->parent < 0) return false; if(!empty($task->team)) diff --git a/module/task/tao.php b/module/task/tao.php index b692e12897..111f546116 100644 --- a/module/task/tao.php +++ b/module/task/tao.php @@ -288,9 +288,6 @@ class taskTao extends taskModel ->autoCheck() ->batchCheckIF($task->status != 'cancel', $requiredFields, 'notempty') ->checkIF(!helper::isZeroDate($task->deadline), 'deadline', 'ge', $task->estStarted) - ->checkIF($task->estimate !== false, 'estimate', 'float') - ->checkIF($task->left !== false, 'left', 'float') - ->checkIF($task->consumed !== false, 'consumed', 'float') ->batchCheckIF($task->status == 'wait' || $task->status == 'doing', 'finishedBy,finishedDate,canceledBy,canceledDate,closedBy,closedDate,closedReason', 'empty') ->checkIF($task->status == 'done', 'consumed', 'notempty') ->checkIF($task->status == 'done' && $task->closedReason, 'closedReason', 'equal', 'done') diff --git a/module/task/test/model/isclickable.php b/module/task/test/model/isclickable.php index 4490aae4a5..d858f23607 100755 --- a/module/task/test/model/isclickable.php +++ b/module/task/test/model/isclickable.php @@ -16,7 +16,7 @@ pid=1 计算任务为父任务 状态为pause 能否进行assignto操作 >> 1 计算任务为父任务 状态为closed 能否进行close操作 >> 2 计算任务为父任务 状态为cancel 能否进行batchcreate操作 >> 1 -计算任务为普通任务 状态为wait 能否进行recordestimate操作 >> 2 +计算任务为普通任务 状态为wait 能否进行recordworkhour操作 >> 2 计算任务为普通任务 状态为doing 能否进行delete操作 >> 2 计算任务为普通任务 状态为done 能否进行start操作 >> 2 计算任务为普通任务 状态为pause 能否进行finished操作 >> 1 @@ -25,7 +25,7 @@ pid=1 计算任务为子任务 状态为wait 能否进行assignto操作 >> 1 计算任务为子任务 状态为doing 能否进行close操作 >> 2 计算任务为子任务 状态为done 能否进行batchcreate操作 >> 2 -计算任务为子任务 状态为pause 能否进行recordestimate操作 >> 1 +计算任务为子任务 状态为pause 能否进行recordworkhour操作 >> 1 计算任务为子任务 状态为closed 能否进行delete操作 >> 1 计算任务为子任务 状态为cancel 能否进行start操作 >> 2 @@ -110,7 +110,7 @@ r($task->isClickableTest($task3, 'pause')) && p('2') && e("2"); //计 r($task->isClickableTest($task4, 'assignto')) && p('1') && e("1"); //计算任务为父任务 状态为pause 能否进行assignto操作 r($task->isClickableTest($task5, 'close')) && p('2') && e("2"); //计算任务为父任务 状态为closed 能否进行close操作 r($task->isClickableTest($task6, 'batchcreate')) && p('1') && e("1"); //计算任务为父任务 状态为cancel 能否进行batchcreate操作 -r($task->isClickableTest($task7, 'recordestimate')) && p('2') && e("2"); //计算任务为普通任务 状态为wait 能否进行recordestimate操作 +r($task->isClickableTest($task7, 'recordworkhour')) && p('2') && e("2"); //计算任务为普通任务 状态为wait 能否进行recordworkhour操作 r($task->isClickableTest($task8, 'delete')) && p('2') && e("2"); //计算任务为普通任务 状态为doing 能否进行delete操作 r($task->isClickableTest($task9, 'start')) && p('2') && e("2"); //计算任务为普通任务 状态为done 能否进行start操作 r($task->isClickableTest($task10, 'finished')) && p('1') && e("1"); //计算任务为普通任务 状态为pause 能否进行finished操作 @@ -119,6 +119,6 @@ r($task->isClickableTest($task12, 'pause')) && p('2') && e("2"); //计 r($task->isClickableTest($task13, 'assignto')) && p('1') && e("1"); //计算任务为子任务 状态为wait 能否进行assignto操作 r($task->isClickableTest($task14, 'close')) && p('2') && e("2"); //计算任务为子任务 状态为doing 能否进行close操作 r($task->isClickableTest($task15, 'batchcreate')) && p('2') && e("2"); //计算任务为子任务 状态为done 能否进行batchcreate操作 -r($task->isClickableTest($task16, 'recordestimate')) && p('1') && e("1"); //计算任务为子任务 状态为pause 能否进行recordestimate操作 +r($task->isClickableTest($task16, 'recordworkhour')) && p('1') && e("1"); //计算任务为子任务 状态为pause 能否进行recordworkhour操作 r($task->isClickableTest($task17, 'delete')) && p('1') && e("1"); //计算任务为子任务 状态为closed 能否进行delete操作 r($task->isClickableTest($task18, 'start')) && p('2') && e("2"); //计算任务为子任务 状态为cancel 能否进行start操作 \ No newline at end of file diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordworkhour.html.php similarity index 100% rename from module/task/view/recordestimate.html.php rename to module/task/view/recordworkhour.html.php diff --git a/module/upgrade/systemfiles.txt b/module/upgrade/systemfiles.txt index 0afc1077d9..f20d9a2cae 100644 --- a/module/upgrade/systemfiles.txt +++ b/module/upgrade/systemfiles.txt @@ -4793,11 +4793,11 @@ ,task/css/finish.zh-cn.css, ,task/css/finish.zh-tw.css, ,task/css/index.html, -,task/css/recordestimate.css, -,task/css/recordestimate.en.css, -,task/css/recordestimate.vi.css, -,task/css/recordestimate.zh-cn.css, -,task/css/recordestimate.zh-tw.css, +,task/css/recordworkhour.css, +,task/css/recordworkhour.en.css, +,task/css/recordworkhour.vi.css, +,task/css/recordworkhour.zh-cn.css, +,task/css/recordworkhour.zh-tw.css, ,task/css/report.css, ,task/css/view.css, ,task/css/view.en.css, @@ -4817,7 +4817,7 @@ ,task/ext/control/exporttemplet.php, ,task/ext/control/import.php, ,task/ext/control/index.html, -,task/ext/control/recordestimate.php, +,task/ext/control/recordworkhour.php, ,task/ext/control/showimport.php, ,task/ext/control/view.php, ,task/ext/css/batchcreate/zentaomax.css, @@ -4910,7 +4910,7 @@ ,task/js/editestimate.js, ,task/js/finish.js, ,task/js/index.html, -,task/js/recordestimate.js, +,task/js/recordworkhour.js, ,task/js/report.js, ,task/js/start.js, ,task/js/view.js, @@ -4949,7 +4949,7 @@ ,task/view/m.start.html.php, ,task/view/m.view.html.php, ,task/view/pause.html.php, -,task/view/recordestimate.html.php, +,task/view/recordworkhour.html.php, ,task/view/report.html.php, ,task/view/restart.html.php, ,task/view/sendmail.html.php,