From 713efb7bd0b66f877bb1fa456a979d3615386914 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Wed, 11 Dec 2013 18:52:19 +0000 Subject: [PATCH] Add phone number to user json object Replace phone number on ticket owner update --- include/class.user.php | 3 ++- include/staff/ticket-view.inc.php | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/class.user.php b/include/class.user.php index 2d837dad0..0998f2348 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -129,7 +129,8 @@ class User extends UserModel { $info = array( 'id' => $this->getId(), 'name' => (string) $this->getName(), - 'email' => (string) $this->getEmail()); + 'email' => (string) $this->getEmail(), + 'phone' => (string) $this->getPhoneNumber()); return JsonDataEncoder::encode($info); } diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 9bc7823ab..cabc6a7ce 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -153,6 +153,7 @@ if($ticket->isOverdue()) function (user) { $('#user-'+user.id+'-name').text(user.name); $('#user-'+user.id+'-email').text(user.email); + $('#user-'+user.id+'-phone').text(user.phone); $('#user-to-name').text(user.name); $('#user-to-email').text(user.email); }); @@ -191,7 +192,9 @@ if($ticket->isOverdue()) </tr> <tr> <th>Phone:</th> - <td><?php echo $ticket->getPhoneNumber(); ?></td> + <td> + <span id="user-<?php echo $ticket->getOwnerId(); ?>-phone"><?php echo $ticket->getPhoneNumber(); ?></span> + </td> </tr> <tr> <th>Source:</th> -- GitLab