mirror of
https://github.com/itflow-org/itflow
synced 2026-12-03 09:39:02 +00:00
Contact alternate email (DB 4.4.1): one more address per contact in the contact window under Email, shown on their page, quick look and the Reach column, searched by the contacts, clients, tickets and global searches, exported and imported as Alternate Email and in the API as contact_email_alt, and recognized on incoming email as theirs - a new ticket as them at their client even with unknown senders off, and their reply by ticket number, conversation or subject - with the ticket's from line showing the address it came from while everything ITFlow sends still goes to their Email and neither address is copied in; the duplicate warning, Try an Email, Unprocessed Email and the ignored sender and routing rule warnings count it too, and the same-as-Email warning shows while typing (contactEmailSql(), contactHasEmail(), contactEmailMatchSql()); 26.12.4 changelog
This commit is contained in:
@@ -96,6 +96,7 @@ function importKinds() {
|
||||
'title' => $f('Title', ['Job Title'], ['example' => 'Office Manager']),
|
||||
'department' => $f('Department', ['Department Name']),
|
||||
'email' => $f('Email', ['Email Address', 'E-mail'], ['example' => 'jordan@example.com']),
|
||||
'email_alt' => $f('Alternate Email', ['Alt Email', 'Alternate Email Address', 'Secondary Email', 'Other Email', 'Personal Email', 'Email 2'], ['example' => 'jordan@personal.example', 'about' => 'Email from it is theirs too']),
|
||||
'phone' => $f('Phone', ['Office Phone', 'Work Phone', 'Phone Number'], ['example' => '412-555-0100']),
|
||||
'extension' => $f('Ext', ['Extension', 'Office Extension']),
|
||||
'mobile' => $f('Mobile', ['Mobile Phone', 'Cell', 'Cell Phone']),
|
||||
@@ -629,6 +630,14 @@ function importContactRow(array $row, $client_id, $existing_id, $write) {
|
||||
$set[] = 'contact_email = ' . importSqlText($value);
|
||||
}
|
||||
}
|
||||
// The alternate email - an address, and not their Email (functions/contact.php)
|
||||
if (contactEmailAltReady() && ($value = $give('email_alt')) !== null) {
|
||||
if ($value !== '' && contactEmailAltClean($value, (string) ($give('email') ?? '')) === '') {
|
||||
$notes[] = importLeftNote('Alternate Email', $value, filter_var($value, FILTER_VALIDATE_EMAIL) ? 'is the same as their Email' : "isn't an email address", $up);
|
||||
} else {
|
||||
$set[] = 'contact_email_alt = ' . importSqlText($value, 200);
|
||||
}
|
||||
}
|
||||
foreach (['phone', 'mobile'] as $key) {
|
||||
if (($value = $give($key)) !== null) {
|
||||
$set[] = importPhoneSql($value, "contact_$key");
|
||||
|
||||
Reference in New Issue
Block a user