History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: CHD-1209
Type: Improvement Improvement
Status: Open Open
Assignee: Unassigned
Reporter: Robert Middleswarth
Votes: 0
Watchers: 1
Operations

Clone this issue
If you were logged in you would be able to see more operations.
Cerberus Helpdesk

Change to Application.class.php

Created: 07/May/09 01:36 PM   Updated: 17/Jun/10 06:08 AM
Fix Version/s: Sea of 1000 Wishes

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File chd-1209.patch (0.6 kb)


xP Priority: 3 - Would Be Nice
Marquee: Mail


 Description   
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);
}

I did this so I could use this for reports were I need both inbox $category_id=0 and all I decided to use $category_id=-1 for.

 All   Comments   Work Log   Change History      Sort Order:
Comment by Robert Middleswarth [07/May/09 02:20 PM]
The change in the fuction removing $category_id = 0; with.

if($t_or_c=='a') {
  $category_id = -1;
} else {
  $category_id = 0;
}

Thanks
Robert

Comment by Robert Middleswarth [20/May/09 05:18 PM]
Jeff,

I would like you to take a 2nd look at this. I have several reports I had made that require this change. I could add a copy of this function to add on plugin but it would be much better to have this in the core product. It should break any core features and give you options so you can use this in the future. Is there something wrong with how I designed this change?

Thanks
Robert

Comment by Robert Middleswarth [07/Jul/09 11:34 PM]
I added it to my github account. It took me a little bit to learn git. It works much diff then svn/cvs that I have worked with in the past.

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

Thanks
Robert

Comment by Robert Middleswarth [09/Jan/10 09:59 AM]
Updated patch using Current Cerb5 repo.

Comment by Robert Middleswarth [09/Jan/10 02:37 PM]
I will be keeping the patch up to date in branch jira/CHD-1209.

For Cerb4 http://github.com/rmiddle/cerb4/tree/jira/CHD-1209
For Cerb5 http://github.com/rmiddle/cerb5/tree/jira/chd-1209

Thanks
Robert