Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* [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
@@ -982,8 +982,8 @@ protected function _getSubtotalCountForStringColumn($dao_class, $field_key, $lab
982 982 'filter' =>
983 983 array(
984 984 'field' => $field_key,
985   - 'oper' => DevblocksSearchCriteria::OPER_IN_OR_NULL,
986   - 'values' => null,
  985 + 'oper' => DevblocksSearchCriteria::OPER_EQ,
  986 + 'values' => '',
987 987 ),
988 988 'children' => array()
989 989 );
16 features/cerberusweb.core/api/dao/notification.php
@@ -515,10 +515,19 @@ function getSubtotalCounts($column) {
515 515 switch($column) {
516 516 case SearchFields_Notification::URL:
517 517 $url_writer = DevblocksPlatform::getUrlService();
518   - $base_url = $url_writer->writeNoProxy('',true);
  518 + $base_url = $url_writer->writeNoProxy('', true);
  519 +
519 520 $counts = $this->_getSubtotalCountForStringColumn('DAO_Notification', $column);
520   - foreach($counts as $k => $v)
521   - $counts[$k]['label'] = str_replace($base_url, '', $v['label']);
  521 +
  522 + foreach($counts as $k => $v) {
  523 + @$counts[$k]['label'] = str_replace($base_url, '', $v['label']);
  524 +
  525 + if($k == '(none)') {
  526 + @$counts[$k]['filter']['values'] = array('value' => '');
  527 + } else {
  528 + @$counts[$k]['filter']['values'] = array('value' => $k);
  529 + }
  530 + }
522 531 break;
523 532
524 533 case SearchFields_Notification::IS_READ:
@@ -606,6 +615,7 @@ function doSetCriteria($field, $oper, $value) {
606 615 case SearchFields_Notification::MESSAGE:
607 616 case SearchFields_Notification::URL:
608 617 $criteria = $this->_doSetCriteriaString($field, $oper, $value);
  618 + break;
609 619
610 620 case SearchFields_Notification::WORKER_ID:
611 621 @$worker_ids = DevblocksPlatform::importGPC($_REQUEST['worker_id'],'array',array());

0 comments on commit d463573

Please sign in to comment.
Something went wrong with that request. Please try again.