Skip to content
Snippets Groups Projects
Commit b1a40975 authored by Tim Steiner's avatar Tim Steiner
Browse files

Supplemental

parent e4add38b
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ class Requests_RequestModel extends Unl_Model
$select = new Zend_Db_Select($db);
$select->from(array('r' => 'creqRequests'), array('requestId'));
$select->join(array('s' => 'creqRequestStacks'), 'r.stackPointer = s.requestStackId', array());
$select->join(array('f' => 'creqApprovalActionsTypeTransformations'), 's.action = f.approvalAction', array());
$select->join(array('f' => 'creqApprovalActionsTypeTransformations'), 's.action = f.approvalAction AND r.type = f.realType', array());
$select->join(array('t' => 'creqRequestTypes'), 'f.viewType = t.requestTypeId', array('name'));
if (Unl_Util::isArray($id)) {
$select->where('r.requestId IN (?)', $id);
......@@ -78,6 +78,7 @@ class Requests_RequestModel extends Unl_Model
$objects[$objectId]->_data['viewType'] = $record['name'];
}
// Most recent approval time
$select = new Zend_Db_Select($db);
$select->from(array('h' => 'creqApprovalHistories'), array('request', 'time' => 'MAX(time)'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment