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 ********************************************************************************/
41 $dictionary['Project'] = array(
43 'unified_search' => true,
44 'unified_search_default_enabled' => false,
45 'comment' => 'Project',
53 'comment' => 'Unique identifier'
55 'date_entered' => array(
56 'name' => 'date_entered',
57 'vname' => 'LBL_DATE_ENTERED',
59 'comment' => 'Date record created',
60 'enable_range_search' => true,
61 'options' => 'date_range_search_dom',
63 'date_modified' => array(
64 'name' => 'date_modified',
65 'vname' => 'LBL_DATE_MODIFIED',
67 'comment' => 'Date record last modified',
68 'enable_range_search' => true,
69 'options' => 'date_range_search_dom',
71 'assigned_user_id' => array(
72 'name' => 'assigned_user_id',
73 'rname' => 'user_name',
74 'id_name' => 'assigned_user_id',
75 'type' => 'assigned_user_name',
76 'vname' => 'LBL_ASSIGNED_USER_ID',
83 'comment' => 'User assigned to this record'
85 'modified_user_id' => array(
86 'name' => 'modified_user_id',
87 'rname' => 'user_name',
88 'id_name' => 'modified_user_id',
89 'vname' => 'LBL_MODIFIED_USER_ID',
90 'type' => 'assigned_user_name',
95 'comment' => 'User who last modified record'
99 'name' => 'modified_by_name',
100 'vname' => 'LBL_MODIFIED_NAME',
104 'rname'=>'user_name',
106 'id_name' => 'modified_user_id',
108 'link'=>'modified_user_link',
109 'duplicate_merge'=>'disabled'
111 'created_by' => array(
112 'name' => 'created_by',
113 'rname' => 'user_name',
114 'id_name' => 'modified_user_id',
115 'vname' => 'LBL_CREATED_BY',
116 'type' => 'assigned_user_name',
120 'comment' => 'User who created record',
124 'name' => 'created_by_name',
125 'vname' => 'LBL_CREATED',
128 'link' => 'created_by_link',
129 'rname' => 'user_name',
132 'id_name' => 'created_by',
134 'duplicate_merge'=>'disabled',
135 'importable' => 'false',
139 'vname' => 'LBL_NAME',
141 'dbType' => 'varchar',
144 'unified_search' => true,
145 'comment' => 'Project name',
146 'importable' => 'required',
149 'description' => array(
150 'name' => 'description',
151 'vname' => 'LBL_DESCRIPTION',
154 'comment' => 'Project description'
158 'vname' => 'LBL_DELETED',
163 'comment' => 'Record deletion indicator'
165 'estimated_start_date' =>
167 'name' => 'estimated_start_date',
168 'vname' => 'LBL_DATE_START',
170 'validation' => array('type' => 'isbefore', 'compareto' => 'estimated_end_date', 'blank' => true),
172 'importable' => 'required',
174 'enable_range_search' => true,
176 'estimated_end_date' =>
178 'name' => 'estimated_end_date',
179 'vname' => 'LBL_DATE_END',
182 'importable' => 'required',
184 'enable_range_search' => true,
189 'vname' => 'LBL_STATUS',
191 'options' => 'project_status_dom',
196 'name' => 'priority',
197 'vname' => 'LBL_PRIORITY',
199 'options' => 'projects_priority_options',
201 'total_estimated_effort' =>
203 'name' => 'total_estimated_effort',
206 'vname'=>'LBL_LIST_TOTAL_ESTIMATED_EFFORT',
208 'total_actual_effort' =>
210 'name' => 'total_actual_effort',
213 'vname'=>'LBL_LIST_TOTAL_ACTUAL_EFFORT',
218 'name' => 'accounts',
220 'relationship' => 'projects_accounts',
223 'vname'=>'LBL_ACCOUNTS',
229 'relationship' => 'projects_quotes',
232 'vname'=>'LBL_QUOTES',
236 'name' => 'contacts',
238 'relationship' => 'projects_contacts',
241 'vname'=>'LBL_CONTACTS',
245 'name' => 'opportunities',
247 'relationship' => 'projects_opportunities',
250 'vname'=>'LBL_OPPORTUNITIES',
256 'relationship' => 'projects_notes',
258 'vname'=>'LBL_NOTES',
264 'relationship' => 'projects_tasks',
266 'vname'=>'LBL_TASKS',
270 'name' => 'meetings',
272 'relationship' => 'projects_meetings',
274 'vname'=>'LBL_MEETINGS',
280 'relationship' => 'projects_calls',
282 'vname'=>'LBL_CALLS',
288 'relationship' => 'emails_projects_rel',
290 'vname'=>'LBL_EMAILS',
294 'name' => 'projecttask',
296 'relationship' => 'projects_project_tasks',
298 'vname'=>'LBL_PROJECT_TASKS',
302 'name' => 'created_by_link',
304 'relationship' => 'projects_created_by',
305 'vname' => 'LBL_CREATED_BY_USER',
306 'link_type' => 'one',
311 'modified_user_link' =>
313 'name' => 'modified_user_link',
315 'relationship' => 'projects_modified_user',
316 'vname' => 'LBL_MODIFIED_BY_USER',
317 'link_type' => 'one',
322 'assigned_user_link' =>
324 'name' => 'assigned_user_link',
326 'relationship' => 'projects_assigned_user',
327 'vname' => 'LBL_ASSIGNED_TO_USER',
328 'link_type' => 'one',
333 'assigned_user_name' =>
335 'name' => 'assigned_user_name',
336 'rname' => 'user_name',
337 'id_name' => 'assigned_user_id',
338 'vname' => 'LBL_ASSIGNED_USER_NAME',
342 'dbType' => 'varchar',
351 'relationship' => 'projects_cases',
354 'vname'=>'LBL_CASES',
360 'relationship' => 'projects_bugs',
367 'name' => 'products',
369 'relationship' => 'projects_products',
372 'vname'=>'LBL_PRODUCTS',
376 array('name' =>'projects_primary_key_index',
378 'fields'=>array('id')
381 'relationships' => array(
382 'projects_notes' => array(
383 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
384 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
385 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
386 'relationship_role_column_value'=>'Project'),
387 'projects_tasks' => array(
388 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
389 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
390 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
391 'relationship_role_column_value'=>'Project'),
392 'projects_meetings' => array(
393 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
394 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
395 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
396 'relationship_role_column_value'=>'Project'),
397 'projects_calls' => array(
398 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
399 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
400 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
401 'relationship_role_column_value'=>'Project'),
402 'projects_emails' => array(
403 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
404 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
405 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
406 'relationship_role_column_value'=>'Project'),
407 'projects_project_tasks' => array(
408 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
409 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'project_id',
410 'relationship_type'=>'one-to-many'),
411 'projects_assigned_user' =>
412 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
413 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'assigned_user_id',
414 'relationship_type'=>'one-to-many')
416 ,'projects_modified_user' =>
417 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
418 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'modified_user_id',
419 'relationship_type'=>'one-to-many')
421 ,'projects_created_by' =>
422 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
423 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'created_by',
424 'relationship_type'=>'one-to-many')
429 VardefManager::createVardef('Project','Project', array(