Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* [Notifications/Subtotals] Fixed an issue with subtotaling a notific…

…ation worklist by URL. Clicking the links didn't add the proper filter.
  • Loading branch information...
commit d463573dc18a6020bbfd4203322f914e3fd9bb86 1 parent 68cb9ee
Jeff Standen authored
4 features/cerberusweb.core/api/dao/abstract_view.php
View
@@ -982,8 +982,8 @@ protected function _getSubtotalCountForStringColumn($dao_class, $field_key, $lab
'filter' =>
array(
'field' => $field_key,
- 'oper' => DevblocksSearchCriteria::OPER_IN_OR_NULL,
- 'values' => null,
+ 'oper' => DevblocksSearchCriteria::OPER_EQ,
+ 'values' => '',
),
'children' => array()
);
16 features/cerberusweb.core/api/dao/notification.php
View
@@ -515,10 +515,19 @@ function getSubtotalCounts($column) {
switch($column) {
case SearchFields_Notification::URL:
$url_writer = DevblocksPlatform::getUrlService();
- $base_url = $url_writer->writeNoProxy('',true);
+ $base_url = $url_writer->writeNoProxy('', true);
+
$counts = $this->_getSubtotalCountForStringColumn('DAO_Notification', $column);
- foreach($counts as $k => $v)
- $counts[$k]['label'] = str_replace($base_url, '', $v['label']);
+
+ foreach($counts as $k => $v) {
+ @$counts[$k]['label'] = str_replace($base_url, '', $v['label']);
+
+ if($k == '(none)') {
+ @$counts[$k]['filter']['values'] = array('value' => '');
+ } else {
+ @$counts[$k]['filter']['values'] = array('value' => $k);
+ }
+ }
break;
case SearchFields_Notification::IS_READ:
@@ -606,6 +615,7 @@ function doSetCriteria($field, $oper, $value) {
case SearchFields_Notification::MESSAGE:
case SearchFields_Notification::URL:
$criteria = $this->_doSetCriteriaString($field, $oper, $value);
+ break;
case SearchFields_Notification::WORKER_ID:
@$worker_ids = DevblocksPlatform::importGPC($_REQUEST['worker_id'],'array',array());
Please sign in to comment.
Something went wrong with that request. Please try again.