[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17121] property: role assignment
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17121] property: role assignment |
Date: |
Tue, 26 Sep 2017 10:29:12 -0400 (EDT) |
Revision: 17121
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17121
Author: sigurdne
Date: 2017-09-26 10:29:12 -0400 (Tue, 26 Sep 2017)
Log Message:
-----------
property: role assignment
Modified Paths:
--------------
trunk/property/inc/class.soresponsible.inc.php
trunk/property/inc/class.uitts.inc.php
Modified: trunk/property/inc/class.soresponsible.inc.php
===================================================================
--- trunk/property/inc/class.soresponsible.inc.php 2017-09-26 10:43:21 UTC
(rev 17120)
+++ trunk/property/inc/class.soresponsible.inc.php 2017-09-26 14:29:12 UTC
(rev 17121)
@@ -908,11 +908,17 @@
return 0;
}
+ if(!empty($data['role_id']))
+ {
+ $role_filter = ' AND fm_responsibility_role.id
=' . (int) $data['role_id'];
+ }
+
$sql = "SELECT contact_id FROM
fm_responsibility_contact"
. " {$this->join} fm_responsibility_role ON
fm_responsibility_contact.responsibility_role_id = fm_responsibility_role.id"
. " {$this->join} fm_responsibility ON
fm_responsibility_role.responsibility_id = fm_responsibility.id"
. " {$this->join} fm_responsibility_module ON
fm_responsibility.id = fm_responsibility_module.responsibility_id"
. ' WHERE cat_id =' . (int)$data['cat_id']
+ ."{$role_filter}"
. ' AND active = 1 AND active_from < ' . time()
. ' AND (active_to > ' . time() . ' OR active_to = 0) AND expired_on IS NULL'
. " {$item_filter}";
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2017-09-26 10:43:21 UTC (rev
17120)
+++ trunk/property/inc/class.uitts.inc.php 2017-09-26 14:29:12 UTC (rev
17121)
@@ -3492,7 +3492,9 @@
$contact_at_location =
$this->bo->config->config_data['contact_at_location'];
$_responsible =
execMethod('property.boresponsible.get_responsible', array('location'=>
explode('-', $ticket['location_code']),
- 'cat_id' => $ticket['cat_id']));
+ 'cat_id' => $ticket['cat_id'],
+ 'role_id' => $contact_at_location
+ ));
if($_responsible)
{
@@ -3500,7 +3502,7 @@
$_responsible_name =
$GLOBALS['phpgw']->accounts->get($_responsible)->__toString();
$_responsible_email =
$prefs['email'];
$_responsible_cellphone =
$prefs['cellphone'];
- if($contact_email)
+ if($contact_email &&
($contact_data['value_contact_email'] != $_responsible_email))
{
$contact_name2 =
$_responsible_name;
$contact_email2 =
$_responsible_email;
@@ -3777,7 +3779,9 @@
$contact_at_location =
$this->bo->config->config_data['contact_at_location'];
$_responsible =
execMethod('property.boresponsible.get_responsible', array('location'=>
explode('-', $ticket['location_code']),
- 'cat_id' => $ticket['cat_id']));
+ 'cat_id' => $ticket['cat_id'],
+ 'role_id' => $contact_at_location)
+ );
if($_responsible)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17121] property: role assignment,
sigurdne <=