vT 7.1 (and earlier) - Duplicate Ticket No. being generated
We had an issue whereby when multiple connections the CRM were creating HelpDesk records, it was possible for the system to generate duplicate Ticket Nos. (e.g TT123456) This was discovered to be due to the fact that the MySQL query to update the entry in vtiger_modentity_num was being done inside a Transaction, and so any other connections (either via Webservice or CRM User directly) that occured at the same time would generate the same number.
this can be easily solved by changing /data/CRMEntity.php setModuleSeqNumber() function so that rather than using the existing database connection which has started a Transaction (global
On a system that is generating approx 1000 Tickets each day, from 3x possible sources (Front-End, and 2x WebService connections) that was experiencing duplicates at a rate of approx 1x a week, this has not produced any duplicates in the last 4 weeks.
This fix also prevents duplication of ANY autoincrement field in any module.