2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
40 $dictionary['ProjectTask'] = array('audited'=>true,
41 'table' => 'project_task',
42 'unified_search' => true,
43 'unified_search_default_enabled' => false,
52 'date_entered' => array(
53 'name' => 'date_entered',
54 'vname' => 'LBL_DATE_ENTERED',
57 'date_modified' => array(
58 'name' => 'date_modified',
59 'vname' => 'LBL_DATE_MODIFIED',
62 'project_id' => array(
63 'name' => 'project_id',
64 'vname' => 'LBL_PROJECT_ID',
67 'reportable' => false,
68 'importable' => 'required',
71 'project_task_id' => array(
72 'name' => 'project_task_id',
73 'vname' => 'LBL_PROJECT_TASK_ID',
76 'reportable' => false,
81 'vname' => 'LBL_NAME',
83 'dbType' => 'varchar',
86 'unified_search' => true,
87 'importable' => 'required',
92 'vname' => 'LBL_STATUS',
95 'options' => 'project_task_status_options',
98 'description' => array(
99 'name' => 'description',
100 'vname' => 'LBL_DESCRIPTION',
104 'predecessors' => array(
105 'name' => 'predecessors',
106 'vname' => 'LBL_PREDECESSORS',
110 'date_start' => array(
111 'name' => 'date_start',
112 'vname' => 'LBL_DATE_START',
114 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_finish', 'blank' => true),
117 'time_start' => array(
118 'name' => 'time_start',
119 'vname' => 'LBL_TIME_START',
122 //'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
125 'time_finish' => array(
126 'name' => 'time_finish',
127 'vname' => 'LBL_TIME_FINISH',
130 // 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
133 'date_finish' => array(
134 'name' => 'date_finish',
135 'vname' => 'LBL_DATE_FINISH',
137 'validation'=>array('type' => 'isafter', 'compareto'=>'date_start', 'blank' => true),
142 'name' => 'duration',
143 'vname' => 'LBL_DURATION',
147 'duration_unit' => array(
148 'name' => 'duration_unit',
149 'vname' => 'LBL_DURATION_UNIT',
150 'options' => 'project_duration_units_dom',
153 'actual_duration' => array(
154 'name' => 'actual_duration',
155 'vname' => 'LBL_ACTUAL_DURATION',
159 'percent_complete' => array(
160 'name' => 'percent_complete',
161 'vname' => 'LBL_PERCENT_COMPLETE',
166 'parent_task_id' => array(
167 'name' => 'parent_task_id',
168 'vname' => 'LBL_PARENT_TASK_ID',
174 'assigned_user_id' => array(
175 'name' => 'assigned_user_id',
176 'rname' => 'user_name',
177 'id_name' => 'assigned_user_id',
178 'type' => 'assigned_user_name',
179 'vname' => 'LBL_ASSIGNED_USER_ID',
187 'modified_user_id' => array(
188 'name' => 'modified_user_id',
189 'rname' => 'user_name',
190 'id_name' => 'modified_user_id',
191 'vname' => 'LBL_MODIFIED_USER_ID',
192 'type' => 'assigned_user_name',
198 'modified_by_name' =>
200 'name' => 'modified_by_name',
201 'vname' => 'LBL_MODIFIED_NAME',
205 'rname'=>'user_name',
207 'id_name' => 'modified_user_id',
209 'link'=>'modified_user_link',
210 'duplicate_merge'=>'disabled'
213 'name' => 'priority',
214 'vname' => 'LBL_PRIORITY',
216 'options' => 'project_task_priority_options',
218 'created_by' => array(
219 'name' => 'created_by',
220 'rname' => 'user_name',
221 'id_name' => 'modified_user_id',
222 'vname' => 'LBL_CREATED_BY',
223 'type' => 'assigned_user_name',
231 'name' => 'created_by_name',
232 'vname' => 'LBL_CREATED',
235 'link' => 'created_by_link',
236 'rname' => 'user_name',
239 'id_name' => 'created_by',
241 'duplicate_merge'=>'disabled',
242 'importable' => 'false',
244 'milestone_flag' => array(
245 'name' => 'milestone_flag',
246 'vname' => 'LBL_MILESTONE_FLAG',
250 'order_number' => array(
251 'name' => 'order_number',
252 'vname' => 'LBL_ORDER_NUMBER',
257 'task_number' => array(
258 'name' => 'task_number',
259 'vname' => 'LBL_TASK_NUMBER',
263 'estimated_effort' => array(
264 'name' => 'estimated_effort',
265 'vname' => 'LBL_ESTIMATED_EFFORT',
269 'actual_effort' => array(
270 'name' => 'actual_effort',
271 'vname' => 'LBL_ACTUAL_EFFORT',
277 'vname' => 'LBL_DELETED',
283 'utilization' => array(
284 'name' => 'utilization',
285 'vname' => 'LBL_UTILIZATION',
288 'validation' => array('type' => 'range', 'min' => 0, 'max' => 100),
289 //'function' => 'getUtilizationDropdown',
290 'function' => array('name'=>'getUtilizationDropdown', 'returns'=>'html', 'include'=>'modules/ProjectTask/ProjectTask.php'),
294 'project_name'=> array(
295 'name'=>'project_name',
297 'id_name'=>'project_id',
298 'vname'=>'LBL_PARENT_NAME',
300 'join_name'=>'project',
304 'link'=>'project_name_link',
312 'relationship' => 'project_tasks_notes',
314 'vname'=>'LBL_NOTES',
320 'relationship' => 'project_tasks_tasks',
322 'vname'=>'LBL_TASKS',
326 'name' => 'meetings',
328 'relationship' => 'project_tasks_meetings',
330 'vname'=>'LBL_MEETINGS',
336 'relationship' => 'project_tasks_calls',
338 'vname'=>'LBL_CALLS',
345 'relationship' => 'emails_project_task_rel',/* reldef in emails */
347 'vname'=>'LBL_EMAILS',
351 'name' => 'projects',
353 'relationship' => 'projects_project_tasks',
355 'vname'=>'LBL_LIST_PARENT_NAME',
359 'name' => 'created_by_link',
361 'relationship' => 'project_tasks_created_by',
362 'vname' => 'LBL_CREATED_BY_USER',
363 'link_type' => 'one',
368 'modified_user_link' =>
370 'name' => 'modified_user_link',
372 'relationship' => 'project_tasks_modified_user',
373 'vname' => 'LBL_MODIFIED_BY_USER',
374 'link_type' => 'one',
379 'project_name_link' =>
381 'name' => 'project_name_link',
383 'relationship' => 'projects_project_tasks',
384 'vname' => 'LBL_PROJECT_NAME',
385 'link_type' => 'one',
386 'module'=>'Projects',
387 'bean_name'=>'Project',
390 'assigned_user_link' =>
392 'name' => 'assigned_user_link',
394 'relationship' => 'project_tasks_assigned_user',
395 'vname' => 'LBL_ASSIGNED_TO_USER',
396 'link_type' => 'one',
401 'assigned_user_name' =>
403 'name' => 'assigned_user_name',
404 'rname' => 'user_name',
405 'id_name' => 'assigned_user_id',
406 'vname' => 'LBL_ASSIGNED_USER_NAME',
410 'dbType' => 'varchar',
419 'name' =>'proj_tasks_primary_key_idx',
421 'fields'=>array('id')
425 'relationships' => array (
426 'project_tasks_notes' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
427 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
428 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
429 'relationship_role_column_value'=>'ProjectTask')
430 ,'project_tasks_tasks' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
431 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
432 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
433 'relationship_role_column_value'=>'ProjectTask')
434 ,'project_tasks_meetings' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
435 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
436 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
437 'relationship_role_column_value'=>'ProjectTask')
438 ,'project_tasks_calls' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
439 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
440 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
441 'relationship_role_column_value'=>'ProjectTask')
442 ,'project_tasks_emails' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
443 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
444 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
445 'relationship_role_column_value'=>'ProjectTask')
447 ,'project_tasks_assigned_user' =>
448 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
449 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'assigned_user_id',
450 'relationship_type'=>'one-to-many')
452 ,'project_tasks_modified_user' =>
453 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
454 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'modified_user_id',
455 'relationship_type'=>'one-to-many')
457 ,'project_tasks_created_by' =>
458 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
459 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'created_by',
460 'relationship_type'=>'one-to-many')
464 VardefManager::createVardef('ProjectTask','ProjectTask', array(