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-2012 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 'full_text_search' => true,
44 'unified_search_default_enabled' => false,
53 'date_entered' => array(
54 'name' => 'date_entered',
55 'vname' => 'LBL_DATE_ENTERED',
57 'enable_range_search' => true,
58 'options' => 'date_range_search_dom',
60 'date_modified' => array(
61 'name' => 'date_modified',
62 'vname' => 'LBL_DATE_MODIFIED',
64 'enable_range_search' => true,
65 'options' => 'date_range_search_dom',
67 'project_id' => array(
68 'name' => 'project_id',
69 'vname' => 'LBL_PROJECT_ID',
72 'reportable' => false,
73 'importable' => 'required',
76 'project_task_id' => array(
77 'name' => 'project_task_id',
78 'vname' => 'LBL_PROJECT_TASK_ID',
81 'reportable' => false,
86 'vname' => 'LBL_NAME',
88 'dbType' => 'varchar',
91 'unified_search' => true,
92 'full_text_search' => array('boost' => 3),
93 'importable' => 'required',
98 'vname' => 'LBL_STATUS',
101 'options' => 'project_task_status_options',
104 'description' => array(
105 'name' => 'description',
106 'vname' => 'LBL_DESCRIPTION',
110 'predecessors' => array(
111 'name' => 'predecessors',
112 'vname' => 'LBL_PREDECESSORS',
116 'date_start' => array(
117 'name' => 'date_start',
118 'vname' => 'LBL_DATE_START',
120 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_finish', 'blank' => true),
122 'enable_range_search' => true,
124 'time_start' => array(
125 'name' => 'time_start',
126 'vname' => 'LBL_TIME_START',
129 //'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
132 'time_finish' => array(
133 'name' => 'time_finish',
134 'vname' => 'LBL_TIME_FINISH',
137 // 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
140 'date_finish' => array(
141 'name' => 'date_finish',
142 'vname' => 'LBL_DATE_FINISH',
144 'validation'=>array('type' => 'isafter', 'compareto'=>'date_start', 'blank' => true),
146 'enable_range_search' => true,
149 'name' => 'duration',
150 'vname' => 'LBL_DURATION',
154 'duration_unit' => array(
155 'name' => 'duration_unit',
156 'vname' => 'LBL_DURATION_UNIT',
157 'options' => 'project_duration_units_dom',
160 'actual_duration' => array(
161 'name' => 'actual_duration',
162 'vname' => 'LBL_ACTUAL_DURATION',
166 'percent_complete' => array(
167 'name' => 'percent_complete',
168 'vname' => 'LBL_PERCENT_COMPLETE',
174 'name' => 'date_due',
175 'vname' => 'LBL_DATE_DUE',
177 'rel_field' => 'time_due',
181 'name' => 'time_due',
182 'vname' => 'LBL_TIME_DUE',
184 'rel_field' => 'date_due',
187 'parent_task_id' => array(
188 'name' => 'parent_task_id',
189 'vname' => 'LBL_PARENT_TASK_ID',
195 'assigned_user_id' => array(
196 'name' => 'assigned_user_id',
197 'rname' => 'user_name',
198 'id_name' => 'assigned_user_id',
199 'type' => 'assigned_user_name',
200 'vname' => 'LBL_ASSIGNED_USER_ID',
208 'modified_user_id' => array(
209 'name' => 'modified_user_id',
210 'rname' => 'user_name',
211 'id_name' => 'modified_user_id',
212 'vname' => 'LBL_MODIFIED_USER_ID',
213 'type' => 'assigned_user_name',
219 'modified_by_name' =>
221 'name' => 'modified_by_name',
222 'vname' => 'LBL_MODIFIED_NAME',
226 'rname'=>'user_name',
228 'id_name' => 'modified_user_id',
230 'link'=>'modified_user_link',
231 'duplicate_merge'=>'disabled'
234 'name' => 'priority',
235 'vname' => 'LBL_PRIORITY',
237 'options' => 'project_task_priority_options',
239 'created_by' => array(
240 'name' => 'created_by',
241 'rname' => 'user_name',
242 'id_name' => 'modified_user_id',
243 'vname' => 'LBL_CREATED_BY',
244 'type' => 'assigned_user_name',
252 'name' => 'created_by_name',
253 'vname' => 'LBL_CREATED',
256 'link' => 'created_by_link',
257 'rname' => 'user_name',
260 'id_name' => 'created_by',
262 'duplicate_merge'=>'disabled',
263 'importable' => 'false',
265 'milestone_flag' => array(
266 'name' => 'milestone_flag',
267 'vname' => 'LBL_MILESTONE_FLAG',
271 'order_number' => array(
272 'name' => 'order_number',
273 'vname' => 'LBL_ORDER_NUMBER',
278 'task_number' => array(
279 'name' => 'task_number',
280 'vname' => 'LBL_TASK_NUMBER',
284 'estimated_effort' => array(
285 'name' => 'estimated_effort',
286 'vname' => 'LBL_ESTIMATED_EFFORT',
290 'actual_effort' => array(
291 'name' => 'actual_effort',
292 'vname' => 'LBL_ACTUAL_EFFORT',
298 'vname' => 'LBL_DELETED',
304 'utilization' => array(
305 'name' => 'utilization',
306 'vname' => 'LBL_UTILIZATION',
309 'validation' => array('type' => 'range', 'min' => 0, 'max' => 100),
310 //'function' => 'getUtilizationDropdown',
311 'function' => array('name'=>'getUtilizationDropdown', 'returns'=>'html', 'include'=>'modules/ProjectTask/ProjectTask.php'),
315 'project_name'=> array(
316 'name'=>'project_name',
318 'id_name'=>'project_id',
319 'vname'=>'LBL_PARENT_NAME',
321 'join_name'=>'project',
325 'link'=>'project_name_link',
333 'relationship' => 'project_tasks_notes',
335 'vname'=>'LBL_NOTES',
341 'relationship' => 'project_tasks_tasks',
343 'vname'=>'LBL_TASKS',
347 'name' => 'meetings',
349 'relationship' => 'project_tasks_meetings',
351 'vname'=>'LBL_MEETINGS',
357 'relationship' => 'project_tasks_calls',
359 'vname'=>'LBL_CALLS',
366 'relationship' => 'emails_project_task_rel',/* reldef in emails */
368 'vname'=>'LBL_EMAILS',
372 'name' => 'projects',
374 'relationship' => 'projects_project_tasks',
376 'vname'=>'LBL_LIST_PARENT_NAME',
380 'name' => 'created_by_link',
382 'relationship' => 'project_tasks_created_by',
383 'vname' => 'LBL_CREATED_BY_USER',
384 'link_type' => 'one',
389 'modified_user_link' =>
391 'name' => 'modified_user_link',
393 'relationship' => 'project_tasks_modified_user',
394 'vname' => 'LBL_MODIFIED_BY_USER',
395 'link_type' => 'one',
400 'project_name_link' =>
402 'name' => 'project_name_link',
404 'relationship' => 'projects_project_tasks',
405 'vname' => 'LBL_PROJECT_NAME',
406 'link_type' => 'one',
408 'bean_name'=>'Project',
411 'assigned_user_link' =>
413 'name' => 'assigned_user_link',
415 'relationship' => 'project_tasks_assigned_user',
416 'vname' => 'LBL_ASSIGNED_TO_USER',
417 'link_type' => 'one',
422 'assigned_user_name' =>
424 'name' => 'assigned_user_name',
425 'rname' => 'user_name',
426 'id_name' => 'assigned_user_id',
427 'vname' => 'LBL_ASSIGNED_USER_NAME',
431 'dbType' => 'varchar',
440 'name' =>'proj_tasks_primary_key_idx',
442 'fields'=>array('id')
446 'relationships' => array (
447 'project_tasks_notes' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
448 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
449 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
450 'relationship_role_column_value'=>'ProjectTask')
451 ,'project_tasks_tasks' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
452 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
453 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
454 'relationship_role_column_value'=>'ProjectTask')
455 ,'project_tasks_meetings' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
456 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
457 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
458 'relationship_role_column_value'=>'ProjectTask')
459 ,'project_tasks_calls' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
460 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
461 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
462 'relationship_role_column_value'=>'ProjectTask')
463 ,'project_tasks_emails' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
464 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
465 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
466 'relationship_role_column_value'=>'ProjectTask')
468 ,'project_tasks_assigned_user' =>
469 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
470 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'assigned_user_id',
471 'relationship_type'=>'one-to-many')
473 ,'project_tasks_modified_user' =>
474 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
475 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'modified_user_id',
476 'relationship_type'=>'one-to-many')
478 ,'project_tasks_created_by' =>
479 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
480 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'created_by',
481 'relationship_type'=>'one-to-many')
485 VardefManager::createVardef('ProjectTask','ProjectTask', array(