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-2013 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 ********************************************************************************/
41 $dictionary['Project'] = array(
43 'unified_search' => true,
44 'full_text_search' => true,
45 'unified_search_default_enabled' => false,
46 'comment' => 'Project',
54 'comment' => 'Unique identifier'
56 'date_entered' => array(
57 'name' => 'date_entered',
58 'vname' => 'LBL_DATE_ENTERED',
60 'comment' => 'Date record created',
61 'enable_range_search' => true,
62 'options' => 'date_range_search_dom',
64 'date_modified' => array(
65 'name' => 'date_modified',
66 'vname' => 'LBL_DATE_MODIFIED',
68 'comment' => 'Date record last modified',
69 'enable_range_search' => true,
70 'options' => 'date_range_search_dom',
72 'assigned_user_id' => array(
73 'name' => 'assigned_user_id',
74 'rname' => 'user_name',
75 'id_name' => 'assigned_user_id',
76 'type' => 'assigned_user_name',
77 'vname' => 'LBL_ASSIGNED_USER_ID',
84 'comment' => 'User assigned to this record'
86 'modified_user_id' => array(
87 'name' => 'modified_user_id',
88 'rname' => 'user_name',
89 'id_name' => 'modified_user_id',
90 'vname' => 'LBL_MODIFIED_USER_ID',
91 'type' => 'assigned_user_name',
96 'comment' => 'User who last modified record'
100 'name' => 'modified_by_name',
101 'vname' => 'LBL_MODIFIED_NAME',
105 'rname'=>'user_name',
107 'id_name' => 'modified_user_id',
109 'link'=>'modified_user_link',
110 'duplicate_merge'=>'disabled'
112 'created_by' => array(
113 'name' => 'created_by',
114 'rname' => 'user_name',
115 'id_name' => 'modified_user_id',
116 'vname' => 'LBL_CREATED_BY',
117 'type' => 'assigned_user_name',
121 'comment' => 'User who created record',
125 'name' => 'created_by_name',
126 'vname' => 'LBL_CREATED',
129 'link' => 'created_by_link',
130 'rname' => 'user_name',
133 'id_name' => 'created_by',
135 'duplicate_merge'=>'disabled',
136 'importable' => 'false',
140 'vname' => 'LBL_NAME',
142 'dbType' => 'varchar',
145 'unified_search' => true,
146 'full_text_search' => array('boost' => 3),
147 'comment' => 'Project name',
148 'importable' => 'required',
151 'description' => array(
152 'name' => 'description',
153 'vname' => 'LBL_DESCRIPTION',
156 'comment' => 'Project description'
160 'vname' => 'LBL_DELETED',
165 'comment' => 'Record deletion indicator'
167 'estimated_start_date' =>
169 'name' => 'estimated_start_date',
170 'vname' => 'LBL_DATE_START',
172 'validation' => array('type' => 'isbefore', 'compareto' => 'estimated_end_date', 'blank' => true),
174 'importable' => 'required',
176 'enable_range_search' => true,
178 'estimated_end_date' =>
180 'name' => 'estimated_end_date',
181 'vname' => 'LBL_DATE_END',
184 'importable' => 'required',
186 'enable_range_search' => true,
191 'vname' => 'LBL_STATUS',
193 'options' => 'project_status_dom',
198 'name' => 'priority',
199 'vname' => 'LBL_PRIORITY',
201 'options' => 'projects_priority_options',
203 'total_estimated_effort' =>
205 'name' => 'total_estimated_effort',
208 'vname'=>'LBL_LIST_TOTAL_ESTIMATED_EFFORT',
210 'total_actual_effort' =>
212 'name' => 'total_actual_effort',
215 'vname'=>'LBL_LIST_TOTAL_ACTUAL_EFFORT',
220 'name' => 'accounts',
222 'relationship' => 'projects_accounts',
225 'vname'=>'LBL_ACCOUNTS',
231 'relationship' => 'projects_quotes',
234 'vname'=>'LBL_QUOTES',
238 'name' => 'contacts',
240 'relationship' => 'projects_contacts',
243 'vname'=>'LBL_CONTACTS',
247 'name' => 'opportunities',
249 'relationship' => 'projects_opportunities',
252 'vname'=>'LBL_OPPORTUNITIES',
258 'relationship' => 'projects_notes',
260 'vname'=>'LBL_NOTES',
266 'relationship' => 'projects_tasks',
268 'vname'=>'LBL_TASKS',
272 'name' => 'meetings',
274 'relationship' => 'projects_meetings',
276 'vname'=>'LBL_MEETINGS',
282 'relationship' => 'projects_calls',
284 'vname'=>'LBL_CALLS',
290 'relationship' => 'emails_projects_rel',
292 'vname'=>'LBL_EMAILS',
296 'name' => 'projecttask',
298 'relationship' => 'projects_project_tasks',
300 'vname'=>'LBL_PROJECT_TASKS',
304 'name' => 'created_by_link',
306 'relationship' => 'projects_created_by',
307 'vname' => 'LBL_CREATED_BY_USER',
308 'link_type' => 'one',
313 'modified_user_link' =>
315 'name' => 'modified_user_link',
317 'relationship' => 'projects_modified_user',
318 'vname' => 'LBL_MODIFIED_BY_USER',
319 'link_type' => 'one',
324 'assigned_user_link' =>
326 'name' => 'assigned_user_link',
328 'relationship' => 'projects_assigned_user',
329 'vname' => 'LBL_ASSIGNED_TO_USER',
330 'link_type' => 'one',
335 'assigned_user_name' =>
337 'name' => 'assigned_user_name',
338 'rname' => 'user_name',
339 'id_name' => 'assigned_user_id',
340 'vname' => 'LBL_ASSIGNED_USER_NAME',
344 'dbType' => 'varchar',
353 'relationship' => 'projects_cases',
356 'vname'=>'LBL_CASES',
362 'relationship' => 'projects_bugs',
369 'name' => 'products',
371 'relationship' => 'projects_products',
374 'vname'=>'LBL_PRODUCTS',
378 array('name' =>'projects_primary_key_index',
380 'fields'=>array('id')
383 'relationships' => array(
384 'projects_notes' => array(
385 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
386 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
387 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
388 'relationship_role_column_value'=>'Project'),
389 'projects_tasks' => array(
390 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
391 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
392 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
393 'relationship_role_column_value'=>'Project'),
394 'projects_meetings' => array(
395 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
396 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
397 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
398 'relationship_role_column_value'=>'Project'),
399 'projects_calls' => array(
400 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
401 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
402 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
403 'relationship_role_column_value'=>'Project'),
404 'projects_emails' => array(
405 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
406 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
407 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
408 'relationship_role_column_value'=>'Project'),
409 'projects_project_tasks' => array(
410 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
411 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'project_id',
412 'relationship_type'=>'one-to-many'),
413 'projects_assigned_user' =>
414 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
415 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'assigned_user_id',
416 'relationship_type'=>'one-to-many')
418 ,'projects_modified_user' =>
419 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
420 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'modified_user_id',
421 'relationship_type'=>'one-to-many')
423 ,'projects_created_by' =>
424 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
425 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'created_by',
426 'relationship_type'=>'one-to-many')
431 VardefManager::createVardef('Project','Project', array(