Results 1 to 5 of 5

Thread: Case number always 0 (zero)

  1. #1
    BigWil is offline Member
    Join Date
    Mar 2011
    Posts
    10

    Default RESOLVED: Case number always 0 (zero)

    Installed 6.1.1 and had this issue. Upgraded to 6.1.2 and still have this issue.

    Tue Mar 1 11:20:01 2011 [44061][1][FATAL] Query Failed: INSERT into cases set id='a352b58d-5ea7-eba1-273d-4d6d46f9048f', name='MySQL troubles', date_entered='2011-03-01 19:20:01', date_modified='2011-03-01 19:20:01', modified_user_id='1', created_by='1', description='Having serious problems with mysql. Please help.\r\n\r\nSamuel', deleted='0', assigned_user_id='1', status='New', priority='P1': MySQL error 1062: Duplicate entry '0' for key 2

    Seems that when the inbound group email account imports an email and tries to convert it to a case that the case number is always zero. This causes the duplicate entry '0' for key two error. The scheduler shows In Progress and doesn't try re-running because of this.

    Anybody know of a quick fix for this or shall i create a bug report? Considering that this has existed for at least two versions now I'm assuming the bug report wouldn't be resolved anytime real soon.

    I noticed a similar report on a different post and the resolution there was to do a repair on the database and run the admin fix database function. That hasn't worked at all.

    BigWil
    Last edited by BigWil; 2011-03-01 at 10:04 PM.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Case number always 0 (zero)

    You have to run mysql check in order to repair the cases table if it is corrupted.
    Then go to Admin -> Repair -> Quick Repair and Rebuild to rebuild the extensions and database.
    Try again.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    BigWil is offline Member
    Join Date
    Mar 2011
    Posts
    10

    Default Re: Case number always 0 (zero)

    It was actually your resolution I attempted earlier. Already did a check and a repair on the table. Then went to Admin > Repair > Quick and did that too. This was not effective.

    I think I have it resolved though. I suspect that somewhere in a previous version maybe 6.1.1 could be earlier the table creation for the cases failed to create an auto increment field for the case number. When i cracked it open to have a look I noticed no auto_increment and a default set for 0 (zero). I turned that column into an autoincrement and cleared the default. I have been sending emails to and from in testing and it seems to be working fine. Just to make sure I had a look at the relationships and those too seem to be fine.

    So I think the answer to this bug is....

    PHP Code:
    ALTER TABLE `casesCHANGE `case_number` `case_numberINT11 NOT NULL AUTO_INCREMENT 
    I'm also noticing that phpmyadmin is complaining about this. "The following indexes appear to be equal and one of them should be removed: casesnumk, case_number" And sure enough these are both set on the same column. One is a UNIQUE and one an INDEX. I think the UNIQUE should suffice but that's just my opinion.

    Thanks for the suggestion though and taking the time to read. Shall I mark this as resolved or do you have any further feedback for me?

    BigWil

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Case number always 0 (zero)

    In my opinion it is resolved. I have no further feedback
    Congrats.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    BigWil is offline Member
    Join Date
    Mar 2011
    Posts
    10

    Default Re: Case number always 0 (zero)

    Thanks that's appreciated.

    BigWil

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. case number
    By blitz2190 in forum Help
    Replies: 12
    Last Post: 2010-01-27, 11:52 PM
  2. Case id and number
    By tanel in forum Help
    Replies: 0
    Last Post: 2006-07-10, 11:03 AM
  3. Case number in case emails
    By rexykik in forum Feature Requests
    Replies: 0
    Last Post: 2006-06-22, 02:15 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
  •