Anonymous Login
2019-12-08 19:06 PST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000192v1.1 Release (Closed)[All Projects] Generalpublic2009-09-09 22:39
Reporterjls 
Assigned Tocaseydk 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version1.1 
Summary0000192: Contact view in Company do not show Company contacts.
Description1º- Contact vidw in company module do not show company contacts.
2º- Add contact_job to this view
3º- Add a problem with search in contact module (it cuts the first character).
4º- Add contact_job to this view
TagsNo tags attached.
Attached Files
  • patch file icon 2009_06_14.patch (5,698 bytes) 1969-12-31 16:00 -
    Index: modules/companies/vw_contacts.php
    ===================================================================
    --- modules/companies/vw_contacts.php	(revision 440)
    +++ modules/companies/vw_contacts.php	(working copy)
    @@ -13,13 +13,14 @@
     require_once $AppUI->getModuleClass('contacts');
     require_once $AppUI->getModuleClass('departments');
     
    -$contacts = CCompany::getContacts($AppUI, $obj->company_id);
    +$contacts = CCompany::getContacts($AppUI, $company_id);
     
     ?><table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl"><?php
     if (count($contacts) > 0) {
     	?>
     	<tr>
     		<th><?php echo $AppUI->_('Name'); ?></th>
    +		<th><?php echo $AppUI->_('Job Title'); ?></th>
     		<th><?php echo $AppUI->_('e-mail'); ?></th>
     		<th><?php echo $AppUI->_('Phone'); ?></th>
     		<th><?php echo $AppUI->_('Department'); ?></th>
    @@ -31,6 +32,7 @@
     		echo $contact_data['contact_first_name'] . ' ' . $contact_data['contact_last_name'];
     		echo '</a>';
     		echo '</td>';
    +		echo '<td class="hilite">' . $contact_data['contact_job'] . '</td>';
     		echo '<td class="hilite"><a href="mailto:' . $contact_data['contact_email'] . '">' . $contact_data['contact_email'] . '</a></td>';
     		echo '<td class="hilite">' . $contact_data['contact_phone'] . '</td>';
     		echo '<td class="hilite">' . $contact_data['dept_name'] . '</td>';
    Index: modules/contacts/contacts.class.php
    ===================================================================
    --- modules/contacts/contacts.class.php	(revision 440)
    +++ modules/contacts/contacts.class.php	(working copy)
    @@ -319,7 +319,7 @@
     	}
     
     	public static function searchContacts($AppUI, $where = '', $searchString = '') {
    -		$showfields = array('contact_address1' => 'contact_address1', 'contact_address2' => 'contact_address2', 'contact_city' => 'contact_city', 'contact_state' => 'contact_state', 'contact_zip' => 'contact_zip', 'contact_country' => 'contact_country', 'contact_company' => 'contact_company', 'company_name' => 'company_name', 'dept_name' => 'dept_name', 'contact_phone' => 'contact_phone', 'contact_phone2' => 'contact_phone2', 'contact_mobile' => 'contact_mobile', 'contact_fax' => 'contact_fax', 'contact_email' => 'contact_email');
    +		$showfields = array('contact_address1' => 'contact_address1', 'contact_address2' => 'contact_address2', 'contact_city' => 'contact_city', 'contact_state' => 'contact_state', 'contact_zip' => 'contact_zip', 'contact_country' => 'contact_country', 'contact_company' => 'contact_company', 'company_name' => 'company_name', 'dept_name' => 'dept_name', 'contact_phone' => 'contact_phone', 'contact_phone2' => 'contact_phone2', 'contact_mobile' => 'contact_mobile', 'contact_fax' => 'contact_fax', 'contact_email' => 'contact_email', 'contact_job'=>'contact_job');
     
     		if ($searchString != '') {
     			$additional_filter = "OR contact_first_name like '%$searchString%' OR contact_last_name  like '%$searchString%'
    Index: modules/contacts/index.php
    ===================================================================
    --- modules/contacts/index.php	(revision 440)
    +++ modules/contacts/index.php	(working copy)
    @@ -34,7 +34,7 @@
     $search_map = array($orderby, 'contact_first_name', 'contact_last_name');
     
     // optional fields shown in the list (could be modified to allow breif and verbose, etc)
    -$showfields = array('contact_address1' => 'contact_address1', 'contact_address2' => 'contact_address2', 'contact_city' => 'contact_city', 'contact_state' => 'contact_state', 'contact_zip' => 'contact_zip', 'contact_country' => 'contact_country', 'contact_company' => 'contact_company', 'company_name' => 'company_name', 'dept_name' => 'dept_name', 'contact_phone' => 'contact_phone', 'contact_phone2' => 'contact_phone2', 'contact_mobile' => 'contact_mobile', 'contact_fax' => 'contact_fax', 'contact_email' => 'contact_email');
    +$showfields = array('contact_job' => 'contact_job', 'contact_address1' => 'contact_address1', 'contact_address2' => 'contact_address2', 'contact_city' => 'contact_city', 'contact_state' => 'contact_state', 'contact_zip' => 'contact_zip', 'contact_country' => 'contact_country', 'contact_company' => 'contact_company', 'company_name' => 'company_name', 'dept_name' => 'dept_name', 'contact_phone' => 'contact_phone', 'contact_phone2' => 'contact_phone2', 'contact_mobile' => 'contact_mobile', 'contact_fax' => 'contact_fax', 'contact_email' => 'contact_email');
     
     // assemble the sql statement
     //$q = new DBQuery;
    @@ -75,7 +75,7 @@
      * Contact search form
      */
     // Let's remove the first '%' that we previously added to ContIdxWhere
    -$default_search_string = w2PformSafe(substr($AppUI->getState('ContIdxWhere'), 1, strlen($AppUI->getState('ContIdxWhere'))), true);
    +$default_search_string = w2PformSafe($AppUI->getState('ContIdxWhere'), true);
     
     $form = '<form action="./index.php" method="get">' . $AppUI->_('Search for') . '
                <input type="text" class="text" name="search_string" value="' . $default_search_string . '" />
    @@ -197,6 +197,8 @@
     														//Don't do a thing
     													} elseif ($val == 'company_name') {
     														$s .= '<tr><td width="35%"><strong>' . $AppUI->_('Company') . ':</strong></td><td class="hilite" width="65%">' . $carr[$z][$x][$key] . '</td></tr>';
    +													} elseif ($val == 'contact_job') {
    +														$s .= '<tr><td width="35%"><strong>' . $AppUI->_('Job Title') . ':</strong></td><td class="hilite" width="65%">' . $carr[$z][$x][$key] . '</td></tr>';
     													} elseif ($val == 'dept_name') {
     														$s .= '<tr><td width="35%"><strong>' . $AppUI->_('Department') . ':</strong></td><td class="hilite" width="65%">' . $carr[$z][$x][$key] . '</td></tr>';
     													} elseif ($val == 'contact_phone') {
    
    patch file icon 2009_06_14.patch (5,698 bytes) 1969-12-31 16:00 +

-Relationships
+Relationships

-Notes

~0000321

caseydk (administrator)

Resolved as described in r496;

~0000440

caseydk (administrator)

Closed for release.
+Notes

-Issue History
Date Modified Username Field Change
2009-06-14 06:29 jls New Issue
2009-06-14 06:29 jls File Added: 2009_06_14.patch
2009-06-15 20:22 caseydk Status new => assigned
2009-06-15 20:22 caseydk Assigned To => caseydk
2009-06-26 11:27 caseydk Project v1.0 Release (Closed) => v1.1 Release (Closed)
2009-07-07 20:43 caseydk Status assigned => resolved
2009-07-07 20:43 caseydk Resolution open => fixed
2009-07-07 20:43 caseydk Note Added: 0000321
2009-09-09 22:39 caseydk Status resolved => closed
2009-09-09 22:39 caseydk Note Added: 0000440
2009-09-09 22:39 caseydk Fixed in Version => 1.1
+Issue History