Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Assignment notification on lead/account won't fire if assigner is assignee?

  1. #1
    Kean is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    25

    Default Assignment notification on lead/account won't fire if assigner is assignee?

    I have assignment notifications set up properly, but apparently it's Sugar's default behavior not to shoot an email when you assign yourself to a lead or account.

    I think this is really silly.

    What file handles the shooting of emails such that I can alter this behavior?

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    Do you have "Notify on Assignment" checked for your user? Is email configured and verified to be working (appears to be so).

  3. #3
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    If assigner is assignee no notification is fired - so it is designed.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  4. #4
    Kean is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    25

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    Quote Originally Posted by eggsurplus View Post
    Do you have "Notify on Assignment" checked for your user? Is email configured and verified to be working (appears to be so).
    Yep. I need to know where the email logic is so I can change this.

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    It should be in data/SugarBean.php (look for "notifications") but I can't find any logic that makes it exclude the current logged in user.

  6. #6
    Kean is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    25

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    Looks like the logic is in this declaration at 1220:


    function save($check_notify = FALSE) {


    but setting that to TRUE still won't fire emails on assigning an account to myself. Odd.

  7. #7
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    That's just for notifications in general. Haven't seen anything that would stop a notification from sending yet for the logged in user.

  8. #8
    Kean is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    25

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    If anywhere I'd expect it to be @ 1596:

    function send_assignment_notifications($notify_user, $admin)

    but like you said, I don't see the limiting logic. Why can't everything be easy?

  9. #9
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    My guess would be it is in whatever code calls save() in SugarBean. For cases, it is in save() within Case.php.

    Important side note: these modifications would not be upgrade safe.

    While on this topic, you'll probably need to build some logic in there to keep it from sending you the message every time you save the record, as it will likely think you are assigning on every save.

    Lastly, I am a bit puzzle why this is such a highly desired feature by your user. Are they aware that every time they enter a record, they are going to get a separate email for each record? Seems like they are just polluting their own mailbox with info they already know.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  10. #10
    valkydrgn is offline Member
    Join Date
    Feb 2008
    Posts
    5

    Default Re: Assignment notification on lead/account won't fire if assigner is assignee?

    Hope this helps...

    The limiting code is in include/MVC/Controller/SugarController.php


    Code:
            public function pre_save(){
                    if(!empty($_POST['assigned_user_id']) && $_POST['assigned_user_id'] != $this->bean->assigned_user_id && $_POST['assigned_user_id']
                    != $GLOBALS['current_user']->id && empty($GLOBALS['sugar_config']['exclude_notifications'][$this->bean->module_dir])){
                            $this->bean->notify_on_save = true;
                    }
                    $GLOBALS['log']->debug("SugarController:: performing pre_save.");
    ....
    I have been trying to come up with a way to auto assign bugs & cases in a before_save logic hook with no success because of this.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 2011-04-28, 04:39 PM
  2. Replies: 0
    Last Post: 2010-07-01, 04:00 PM
  3. pull out lead assignee
    By lukesdyer in forum Developer Help
    Replies: 0
    Last Post: 2010-02-05, 09:29 PM
  4. Behavior of I-E contact/lead/account assignment
    By sunside in forum Feature Requests
    Replies: 2
    Last Post: 2006-04-06, 11:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •