Skip to main content

[CHD-1209] Patch to allow a list of Groups, Buckets including both Inbox's and All in a signal pull down.

In Fix Branch: 
Yes
Jira
Jira Status: 
In Wish List Hell
GitHub Branches

I did this so I could use this for reports were I need both inbox = $category_id=0 and all $category_id=-1 without this patch you can have inbox or all = $category_id=0. That is how it is used throughout cerb4 now.

Change to Application.class.php

Under Class CerberusApplication
Function translateTeamCategoryCode

I made the following changes.

/**
* Translates the string version of a group/bucket combo into their
* respective IDs.
*
* @todo This needs a better name and home
*/
static function translateTeamCategoryCode($code) {
  $t_or_c = substr($code,0,1);
  $t_or_c_id = intval(substr($code,1));

  if($t_or_c=='c') {
    $categories = DAO_Bucket::getAll();
    $team_id = $categories[$t_or_c_id]->team_id;
    $category_id = $t_or_c_id;
  } else {
    $team_id = $t_or_c_id;
    if($t_or_c=='a') {
      $category_id = -1;
    } else {
      $category_id = 0;
    }
  }
  return array($team_id, $category_id);
}

Link to a real patch,

http://github.com/rmiddle/cerb4/commit/a62f740b1688df581d4d0bbf51de8947c...

AttachmentSize
cerb4-chd-1209.patch590 bytes
cerb5-chd-1209.patch590 bytes

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.
  • Project issue numbers (ex. [#12345]) turn into links automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.