2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition 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',
56 'enable_range_search' => true,
57 'options' => 'date_range_search_dom',
59 'date_modified' => array(
60 'name' => 'date_modified',
61 'vname' => 'LBL_DATE_MODIFIED',
63 'enable_range_search' => true,
64 'options' => 'date_range_search_dom',
66 'project_id' => array(
67 'name' => 'project_id',
68 'vname' => 'LBL_PROJECT_ID',
71 'reportable' => false,
72 'importable' => 'required',
75 'project_task_id' => array(
76 'name' => 'project_task_id',
77 'vname' => 'LBL_PROJECT_TASK_ID',
80 'reportable' => false,
85 'vname' => 'LBL_NAME',
87 'dbType' => 'varchar',
90 'unified_search' => true,
91 'importable' => 'required',
96 'vname' => 'LBL_STATUS',
99 'options' => 'project_task_status_options',
102 'description' => array(
103 'name' => 'description',
104 'vname' => 'LBL_DESCRIPTION',
108 'predecessors' => array(
109 'name' => 'predecessors',
110 'vname' => 'LBL_PREDECESSORS',
114 'date_start' => array(
115 'name' => 'date_start',
116 'vname' => 'LBL_DATE_START',
118 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_finish', 'blank' => true),
120 'enable_range_search' => true,
122 'time_start' => array(
123 'name' => 'time_start',
124 'vname' => 'LBL_TIME_START',
127 //'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
130 'time_finish' => array(
131 'name' => 'time_finish',
132 'vname' => 'LBL_TIME_FINISH',
135 // 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
138 'date_finish' => array(
139 'name' => 'date_finish',
140 'vname' => 'LBL_DATE_FINISH',
142 'validation'=>array('type' => 'isafter', 'compareto'=>'date_start', 'blank' => true),
144 'enable_range_search' => true,
147 'name' => 'duration',
148 'vname' => 'LBL_DURATION',
152 'duration_unit' => array(
153 'name' => 'duration_unit',
154 'vname' => 'LBL_DURATION_UNIT',
155 'options' => 'project_duration_units_dom',
158 'actual_duration' => array(
159 'name' => 'actual_duration',
160 'vname' => 'LBL_ACTUAL_DURATION',
164 'percent_complete' => array(
165 'name' => 'percent_complete',
166 'vname' => 'LBL_PERCENT_COMPLETE',
171 'parent_task_id' => array(
172 'name' => 'parent_task_id',
173 'vname' => 'LBL_PARENT_TASK_ID',
179 'assigned_user_id' => array(
180 'name' => 'assigned_user_id',
181 'rname' => 'user_name',
182 'id_name' => 'assigned_user_id',
183 'type' => 'assigned_user_name',
184 'vname' => 'LBL_ASSIGNED_USER_ID',
192 'modified_user_id' => array(
193 'name' => 'modified_user_id',
194 'rname' => 'user_name',
195 'id_name' => 'modified_user_id',
196 'vname' => 'LBL_MODIFIED_USER_ID',
197 'type' => 'assigned_user_name',
203 'modified_by_name' =>
205 'name' => 'modified_by_name',
206 'vname' => 'LBL_MODIFIED_NAME',
210 'rname'=>'user_name',
212 'id_name' => 'modified_user_id',
214 'link'=>'modified_user_link',
215 'duplicate_merge'=>'disabled'
218 'name' => 'priority',
219 'vname' => 'LBL_PRIORITY',
221 'options' => 'project_task_priority_options',
223 'created_by' => array(
224 'name' => 'created_by',
225 'rname' => 'user_name',
226 'id_name' => 'modified_user_id',
227 'vname' => 'LBL_CREATED_BY',
228 'type' => 'assigned_user_name',
236 'name' => 'created_by_name',
237 'vname' => 'LBL_CREATED',
240 'link' => 'created_by_link',
241 'rname' => 'user_name',
244 'id_name' => 'created_by',
246 'duplicate_merge'=>'disabled',
247 'importable' => 'false',
249 'milestone_flag' => array(
250 'name' => 'milestone_flag',
251 'vname' => 'LBL_MILESTONE_FLAG',
255 'order_number' => array(
256 'name' => 'order_number',
257 'vname' => 'LBL_ORDER_NUMBER',
262 'task_number' => array(
263 'name' => 'task_number',
264 'vname' => 'LBL_TASK_NUMBER',
268 'estimated_effort' => array(
269 'name' => 'estimated_effort',
270 'vname' => 'LBL_ESTIMATED_EFFORT',
274 'actual_effort' => array(
275 'name' => 'actual_effort',
276 'vname' => 'LBL_ACTUAL_EFFORT',
282 'vname' => 'LBL_DELETED',
288 'utilization' => array(
289 'name' => 'utilization',
290 'vname' => 'LBL_UTILIZATION',
293 'validation' => array('type' => 'range', 'min' => 0, 'max' => 100),
294 //'function' => 'getUtilizationDropdown',
295 'function' => array('name'=>'getUtilizationDropdown', 'returns'=>'html', 'include'=>'modules/ProjectTask/ProjectTask.php'),
299 'project_name'=> array(
300 'name'=>'project_name',
302 'id_name'=>'project_id',
303 'vname'=>'LBL_PARENT_NAME',
305 'join_name'=>'project',
309 'link'=>'project_name_link',
317 'relationship' => 'project_tasks_notes',
319 'vname'=>'LBL_NOTES',
325 'relationship' => 'project_tasks_tasks',
327 'vname'=>'LBL_TASKS',
331 'name' => 'meetings',
333 'relationship' => 'project_tasks_meetings',
335 'vname'=>'LBL_MEETINGS',
341 'relationship' => 'project_tasks_calls',
343 'vname'=>'LBL_CALLS',
350 'relationship' => 'emails_project_task_rel',/* reldef in emails */
352 'vname'=>'LBL_EMAILS',
356 'name' => 'projects',
358 'relationship' => 'projects_project_tasks',
360 'vname'=>'LBL_LIST_PARENT_NAME',
364 'name' => 'created_by_link',
366 'relationship' => 'project_tasks_created_by',
367 'vname' => 'LBL_CREATED_BY_USER',
368 'link_type' => 'one',
373 'modified_user_link' =>
375 'name' => 'modified_user_link',
377 'relationship' => 'project_tasks_modified_user',
378 'vname' => 'LBL_MODIFIED_BY_USER',
379 'link_type' => 'one',
384 'project_name_link' =>
386 'name' => 'project_name_link',
388 'relationship' => 'projects_project_tasks',
389 'vname' => 'LBL_PROJECT_NAME',
390 'link_type' => 'one',
391 'module'=>'Projects',
392 'bean_name'=>'Project',
395 'assigned_user_link' =>
397 'name' => 'assigned_user_link',
399 'relationship' => 'project_tasks_assigned_user',
400 'vname' => 'LBL_ASSIGNED_TO_USER',
401 'link_type' => 'one',
406 'assigned_user_name' =>
408 'name' => 'assigned_user_name',
409 'rname' => 'user_name',
410 'id_name' => 'assigned_user_id',
411 'vname' => 'LBL_ASSIGNED_USER_NAME',
415 'dbType' => 'varchar',
424 'name' =>'proj_tasks_primary_key_idx',
426 'fields'=>array('id')
430 'relationships' => array (
431 'project_tasks_notes' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
432 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
433 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
434 'relationship_role_column_value'=>'ProjectTask')
435 ,'project_tasks_tasks' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
436 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
437 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
438 'relationship_role_column_value'=>'ProjectTask')
439 ,'project_tasks_meetings' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
440 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
441 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
442 'relationship_role_column_value'=>'ProjectTask')
443 ,'project_tasks_calls' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
444 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
445 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
446 'relationship_role_column_value'=>'ProjectTask')
447 ,'project_tasks_emails' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
448 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
449 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
450 'relationship_role_column_value'=>'ProjectTask')
452 ,'project_tasks_assigned_user' =>
453 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
454 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'assigned_user_id',
455 'relationship_type'=>'one-to-many')
457 ,'project_tasks_modified_user' =>
458 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
459 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'modified_user_id',
460 'relationship_type'=>'one-to-many')
462 ,'project_tasks_created_by' =>
463 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
464 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'created_by',
465 'relationship_type'=>'one-to-many')
469 VardefManager::createVardef('ProjectTask','ProjectTask', array(