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 ********************************************************************************/
38 $dictionary['Bug'] = array('table' => 'bugs', 'audited'=>true, 'comment' => 'Bugs are defects in products and services','duplicate_merge'=>true
39 ,'unified_search' => true,'fields' => array (
42 'name'=>'found_in_release',
44 'function'=>'getReleaseDropDown',
45 'vname' => 'LBL_FOUND_IN_RELEASE',
47 //'merge_filter' => 'enabled', //bug 22994, I think the former fixing is just avoiding the cross table query, it is not a good method.
48 'comment' => 'The software or service release that manifested the bug',
49 'duplicate_merge' => 'disabled',
51 'studio' => array('fields' => 'false', 'listview' => false, 'wirelesslistview' => false ), // tyoung bug 16442 - don't show in studio fields list
56 'name' => 'release_name',
58 'vname'=>'LBL_FOUND_IN_RELEASE',
61 'group'=>'found_in_release',
65 'merge_filter' => 'enabled', //bug 22994, we should use the release name to search, I have write codes to operate the cross table query.
66 'id_name'=>'found_in_release',
68 'link' => 'release_link',
69 'massupdate' => false,
72 'detailview' => false,
73 'quickcreate' => false,
74 'basic_search' => false,
75 'advanced_search' => false,
76 //BEGIN SUGARCRM flav=pro
77 'wirelesseditview' => false,
78 'wirelessdetailview' => false,
79 'wirelesslistview' => 'visible',
80 'wireless_basic_search' => false,
81 'wireless_advanced_search' => false,
82 //END SUGARCRM flav=pro
88 'name'=>'fixed_in_release',
90 'function'=>'getReleaseDropDown',
91 'vname' => 'LBL_FIXED_IN_RELEASE',
93 'comment' => 'The software or service release that corrected the bug',
94 'duplicate_merge' => 'disabled',
96 'studio' => array('fields' => 'false', 'listview' => false, 'wirelesslistview' => false), // tyoung bug 16442 - don't show in studio fields list
99 'fixed_in_release_name'=>
101 'name' => 'fixed_in_release_name',
103 'group'=>'fixed_in_release',
104 'id_name' => 'fixed_in_release',
105 'vname' => 'LBL_FIXED_IN_RELEASE',
107 'table' => 'releases',
109 'massupdate' => false,
110 'module' => 'Releases',
111 'dbType' => 'varchar',
114 'link' => 'fixed_in_release_link',
117 'detailview' => false,
118 'quickcreate' => false,
119 'basic_search' => false,
120 'advanced_search' => false,
121 //BEGIN SUGARCRM flav=pro
122 'wirelesseditview' => false,
123 'wirelessdetailview' => false,
124 'wirelesslistview' => 'visible',
125 'wireless_basic_search' => false,
126 'wireless_advanced_search' => false,
127 //END SUGARCRM flav=pro
133 'vname' => 'LBL_SOURCE',
135 'options'=>'source_dom',
137 'comment' => 'An indicator of how the bug was entered (ex: via web, email, etc.)'
139 'product_category' =>
141 'name' => 'product_category',
142 'vname' => 'LBL_PRODUCT_CATEGORY',
144 'options'=>'product_category_dom',
146 'comment' => 'Where the bug was discovered (ex: Accounts, Contacts, Leads)'
154 'relationship' => 'bug_tasks',
162 'relationship' => 'bug_notes',
168 'name' => 'meetings',
170 'relationship' => 'bug_meetings',
172 'vname'=>'LBL_MEETINGS'
178 'relationship' => 'bug_calls',
186 'relationship' => 'emails_bugs_rel',/* reldef in emails */
188 'vname'=>'LBL_EMAILS'
192 'name' => 'documents',
194 'relationship' => 'documents_bugs',
195 'source' => 'non-db',
196 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
200 'name' => 'contacts',
202 'relationship' => 'contacts_bugs',
204 'vname'=>'LBL_CONTACTS'
208 'name' => 'accounts',
210 'relationship' => 'accounts_bugs',
212 'vname'=>'LBL_ACCOUNTS'
218 'relationship' => 'cases_bugs',
224 'name' => 'release_link',
226 'relationship' => 'bugs_release',
227 'vname' => 'LBL_FOUND_IN_RELEASE',
228 'link_type' => 'one',
229 'module'=>'Releases',
230 'bean_name'=>'Release',
233 'fixed_in_release_link' =>
235 'name' => 'fixed_in_release_link',
237 'relationship' => 'bugs_fixed_in_release',
238 'vname' => 'LBL_FIXED_IN_RELEASE',
239 'link_type' => 'one',
240 'module'=>'Releases',
241 'bean_name'=>'Release',
247 'name' => 'projects',
249 'relationship' => 'projects_bugs',
251 'vname'=>'LBL_PROJECTS',
255 , 'indices' => array (
256 array('name' =>'bug_number', 'type' =>'index', 'fields'=>array('bug_number')),
258 array('name' =>'idx_bug_name', 'type' =>'index', 'fields'=>array('name'))
261 , 'relationships' => array (
262 'bug_tasks' => array('lhs_module'=> 'Bugs', 'lhs_table'=> 'bugs', 'lhs_key' => 'id',
263 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
264 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
265 'relationship_role_column_value'=>'Bugs')
266 ,'bug_meetings' => array('lhs_module'=> 'Bugs', 'lhs_table'=> 'bugs', 'lhs_key' => 'id',
267 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
268 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
269 'relationship_role_column_value'=>'Bugs')
270 ,'bug_calls' => array('lhs_module'=> 'Bugs', 'lhs_table'=> 'bugs', 'lhs_key' => 'id',
271 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
272 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
273 'relationship_role_column_value'=>'Bugs')
274 ,'bug_emails' => array('lhs_module'=> 'Bugs', 'lhs_table'=> 'bugs', 'lhs_key' => 'id',
275 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
276 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
277 'relationship_role_column_value'=>'Bugs')
278 ,'bug_notes' => array('lhs_module'=> 'Bugs', 'lhs_table'=> 'bugs', 'lhs_key' => 'id',
279 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
280 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
281 'relationship_role_column_value'=>'Bugs')
283 ,'bugs_assigned_user' =>
284 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
285 'rhs_module'=> 'Bugs', 'rhs_table'=> 'bugs', 'rhs_key' => 'assigned_user_id',
286 'relationship_type'=>'one-to-many')
288 ,'bugs_modified_user' =>
289 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
290 'rhs_module'=> 'Bugs', 'rhs_table'=> 'bugs', 'rhs_key' => 'modified_user_id',
291 'relationship_type'=>'one-to-many')
293 ,'bugs_created_by' =>
294 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
295 'rhs_module'=> 'Bugs', 'rhs_table'=> 'bugs', 'rhs_key' => 'created_by',
296 'relationship_type'=>'one-to-many')
298 array('lhs_module'=> 'Releases', 'lhs_table'=> 'releases', 'lhs_key' => 'id',
299 'rhs_module'=> 'Bugs', 'rhs_table'=> 'bugs', 'rhs_key' => 'found_in_release',
300 'relationship_type'=>'one-to-many')
301 ,'bugs_fixed_in_release' =>
302 array('lhs_module'=> 'Releases', 'lhs_table'=> 'releases', 'lhs_key' => 'id',
303 'rhs_module'=> 'Bugs', 'rhs_table'=> 'bugs', 'rhs_key' => 'fixed_in_release',
304 'relationship_type'=>'one-to-many')
306 ), //This enables optimistic locking for Saves From EditView
307 'optimistic_locking'=>true,
310 VardefManager::createVardef('Bugs','Bug', array('default', 'assignable',
314 //jc - adding for refactor for import to not use the required_fields array
315 //defined in the field_arrays.php file
316 $dictionary['Bug']['fields']['name']['importable'] = 'required';