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 ********************************************************************************/
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'
61 'date_modified' => array(
62 'name' => 'date_modified',
63 'vname' => 'LBL_DATE_MODIFIED',
65 'comment' => 'Date record last modified'
67 'assigned_user_id' => array(
68 'name' => 'assigned_user_id',
69 'rname' => 'user_name',
70 'id_name' => 'assigned_user_id',
71 'type' => 'assigned_user_name',
72 'vname' => 'LBL_ASSIGNED_USER_ID',
79 'comment' => 'User assigned to this record'
81 'modified_user_id' => array(
82 'name' => 'modified_user_id',
83 'rname' => 'user_name',
84 'id_name' => 'modified_user_id',
85 'vname' => 'LBL_MODIFIED_USER_ID',
86 'type' => 'assigned_user_name',
91 'comment' => 'User who last modified record'
95 'name' => 'modified_by_name',
96 'vname' => 'LBL_MODIFIED_NAME',
100 'rname'=>'user_name',
102 'id_name' => 'modified_user_id',
104 'link'=>'modified_user_link',
105 'duplicate_merge'=>'disabled'
107 'created_by' => array(
108 'name' => 'created_by',
109 'rname' => 'user_name',
110 'id_name' => 'modified_user_id',
111 'vname' => 'LBL_CREATED_BY',
112 'type' => 'assigned_user_name',
116 'comment' => 'User who created record',
120 'name' => 'created_by_name',
121 'vname' => 'LBL_CREATED',
124 'link' => 'created_by_link',
125 'rname' => 'user_name',
128 'id_name' => 'created_by',
130 'duplicate_merge'=>'disabled',
131 'importable' => 'false',
135 'vname' => 'LBL_NAME',
137 'dbType' => 'varchar',
140 'unified_search' => true,
141 'comment' => 'Project name',
142 'importable' => 'required',
145 'description' => array(
146 'name' => 'description',
147 'vname' => 'LBL_DESCRIPTION',
150 'comment' => 'Project description'
154 'vname' => 'LBL_DELETED',
159 'comment' => 'Record deletion indicator'
161 'estimated_start_date' =>
163 'name' => 'estimated_start_date',
164 'vname' => 'LBL_DATE_START',
166 'validation' => array('type' => 'isbefore', 'compareto' => 'estimated_end_date', 'blank' => true),
168 'importable' => 'required',
171 'estimated_end_date' =>
173 'name' => 'estimated_end_date',
174 'vname' => 'LBL_DATE_END',
177 'importable' => 'required',
183 'vname' => 'LBL_STATUS',
185 'options' => 'project_status_dom',
190 'name' => 'priority',
191 'vname' => 'LBL_PRIORITY',
193 'options' => 'projects_priority_options',
195 'total_estimated_effort' =>
197 'name' => 'total_estimated_effort',
200 'vname'=>'LBL_LIST_TOTAL_ESTIMATED_EFFORT',
202 'total_actual_effort' =>
204 'name' => 'total_actual_effort',
207 'vname'=>'LBL_LIST_TOTAL_ACTUAL_EFFORT',
212 'name' => 'accounts',
214 'relationship' => 'projects_accounts',
217 'vname'=>'LBL_ACCOUNTS',
223 'relationship' => 'projects_quotes',
226 'vname'=>'LBL_QUOTES',
230 'name' => 'contacts',
232 'relationship' => 'projects_contacts',
235 'vname'=>'LBL_CONTACTS',
239 'name' => 'opportunities',
241 'relationship' => 'projects_opportunities',
244 'vname'=>'LBL_OPPORTUNITIES',
250 'relationship' => 'projects_notes',
252 'vname'=>'LBL_NOTES',
258 'relationship' => 'projects_tasks',
260 'vname'=>'LBL_TASKS',
264 'name' => 'meetings',
266 'relationship' => 'projects_meetings',
268 'vname'=>'LBL_MEETINGS',
274 'relationship' => 'projects_calls',
276 'vname'=>'LBL_CALLS',
282 'relationship' => 'emails_projects_rel',
284 'vname'=>'LBL_EMAILS',
288 'name' => 'projecttask',
290 'relationship' => 'projects_project_tasks',
292 'vname'=>'LBL_PROJECT_TASKS',
296 'name' => 'created_by_link',
298 'relationship' => 'projects_created_by',
299 'vname' => 'LBL_CREATED_BY_USER',
300 'link_type' => 'one',
305 'modified_user_link' =>
307 'name' => 'modified_user_link',
309 'relationship' => 'projects_modified_user',
310 'vname' => 'LBL_MODIFIED_BY_USER',
311 'link_type' => 'one',
316 'assigned_user_link' =>
318 'name' => 'assigned_user_link',
320 'relationship' => 'projects_assigned_user',
321 'vname' => 'LBL_ASSIGNED_TO_USER',
322 'link_type' => 'one',
327 'assigned_user_name' =>
329 'name' => 'assigned_user_name',
330 'rname' => 'user_name',
331 'id_name' => 'assigned_user_id',
332 'vname' => 'LBL_ASSIGNED_USER_NAME',
336 'dbType' => 'varchar',
345 'relationship' => 'projects_cases',
348 'vname'=>'LBL_CASES',
354 'relationship' => 'projects_bugs',
361 'name' => 'products',
363 'relationship' => 'projects_products',
366 'vname'=>'LBL_PRODUCTS',
370 array('name' =>'projects_primary_key_index',
372 'fields'=>array('id')
375 'relationships' => array(
376 'projects_notes' => array(
377 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
378 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
379 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
380 'relationship_role_column_value'=>'Project'),
381 'projects_tasks' => array(
382 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
383 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
384 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
385 'relationship_role_column_value'=>'Project'),
386 'projects_meetings' => array(
387 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
388 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
389 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
390 'relationship_role_column_value'=>'Project'),
391 'projects_calls' => array(
392 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
393 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
394 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
395 'relationship_role_column_value'=>'Project'),
396 'projects_emails' => array(
397 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
398 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
399 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
400 'relationship_role_column_value'=>'Project'),
401 'projects_project_tasks' => array(
402 'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
403 'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'project_id',
404 'relationship_type'=>'one-to-many'),
405 'projects_assigned_user' =>
406 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
407 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'assigned_user_id',
408 'relationship_type'=>'one-to-many')
410 ,'projects_modified_user' =>
411 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
412 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'modified_user_id',
413 'relationship_type'=>'one-to-many')
415 ,'projects_created_by' =>
416 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
417 'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'created_by',
418 'relationship_type'=>'one-to-many')
423 VardefManager::createVardef('Project','Project', array(