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

Key: CHD-16
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Assignee: Unassigned
Reporter: Jeff Standen [WGM]
Votes: 0
Watchers: 0
Operations

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

You can create a bucket with the same name as another bucket

Created: 09/Jul/07 12:57 PM   Updated: 13/Jul/07 02:45 AM
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description   
We just need to check the hash in CerberusApplication when adding a bucket.

Ideally this would even be checked in Ajax form validation before the form is submitted. Though in the simplest form it's good enough to just ignore any duplicates and not insert or report anything.

 All   Comments   Work Log   Change History      Sort Order:
Comment by Jeff Standen [WGM] [09/Jul/07 09:15 PM]
Just do the latter here and ignore the insert on any bucket names that already exist for this team. You can figure that out from the global bucket hash provided by DAO_Bucket::getAll()

Just array_flip() the submitted bucket names so they become indexes, and foreach over it with isset() and it won't cost any extra queries. Be sure you're comparing team_id's because 2 teams can have a bucket names 'Spam' -- just not the same team twice.

Comment by Mike Fogg [12/Jul/07 01:31 AM]
Duplicate named buckets in the same category are no longer inserted.

Comment by Joe Geck [13/Jul/07 02:45 AM]
No dupes here.