#216 ✓resolved
Steve Kenworthy

Email dropbox fails to create new objects if default access policy is set to "Shared"

Reported by Steve Kenworthy | August 13th, 2010 @ 09:14 PM | in 0.9.10 "Alekhine"

When running "rake crm:dropbox:run" I get a validation error if my default site access is set to "Shared".

This happens when the create! method is called for Account/Lead/Opportunity etc because validation fails - access is set to shared but no permissions are set.

The quick way to see this error is to set default access to "Shared" in settings.yml and then run the dropbox tests. A few will fail.

I've attached a fix which sets the access to "Private" for these new objects when the site default is "Shared". My reasoning was that the dropbox runner doesn't know who to share the object with so it shouldn't try to guess.

See http://github.com/crossroads/fat_free_crm/commit/c53677a17f97f7dc3a...

Been playing with dropbox functionality recently and I really like it. Good work!

Error message

 Dropbox: fetched new message...
  From: Steve@example.com, Subject: FW: Info about a new contact (<03915F98DC4EF54CA3EA2597A1149AC518D75D677A@example.com>)
Dropbox: Opportunity This is a new opportunity 5 not found, creating new one...
Validation failed: Access translation missing: en, activerecord, errors, models, opportunity, attributes, access, share_opportunity
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/validations.rb:1102:in `save_without_dirty!'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/dirty.rb:87:in `save_without_transactions!'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:200:in `save!'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:182:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:200:in `save!'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:200:in `save!'
/var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/timestamp.rb:37:in `touch'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:282:in `attach'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:241:in `find_or_create_and_attach'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:99:in `process'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:187:in `with_explicit_keyword'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:98:in `process'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:38:in `run'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:80:in `with_new_emails'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:75:in `each'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:75:in `with_new_emails'
/home/steve/rails/crm/lib/fat_free_crm/dropbox.rb:37:in `run'
/home/steve/rails/crm/lib/tasks/dropbox.rake:7

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby on Rails CRM platform for Web 2.0 and beyond

People watching this ticket

Tags

Pages