salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.41k stars 2.07k forks source link

Using Quote Activity Duplicate results in triplicates of the Line Items #9933

Open vanessajeff opened 1 year ago

vanessajeff commented 1 year ago

This has been reported many times in the forum and causes major issues for us - https://community.suitecrm.com/t/calculated-fields-in-workflow-cause-duplicate-groups-in-new-quotes/79010 https://community.suitecrm.com/t/using-duplicate-option-creates-multiple-line-items/77451 https://community.suitecrm.com/t/getting-duplicate-line-items-on-quote/33138 https://community.suitecrm.com/t/duplicate-quotes-create-3-times-product-list/87084

Expected Behavior

When you go to a Quote, use the ACTIONS drop-down then click Duplicate, it should duplicate the Quote and each Line Item per the original Quote.

Actual Behavior

When you go to a Quote, use the ACTIONS drop-down then click Duplicate, the new Quote has the same details but all Line Items are repeated between 2 and 4 times

Unsure sorry

Possible Fix

Unsure sorry

Steps to Reproduce

  1. Create a Quote with Line Items
  2. Go to Quote then ACTIONS then click Duplicate
  3. Line Items are repeated

Context

It means we have to create all Quotes from scratch instead of using our base quotes.

It is high for us and has been for some time! I was looking on the Forum again today to see if there had been any progress and found some additional items about the same issue for other people and that it should be put into github.

Your Environment

serhiisamko091184 commented 7 months ago

Hello @vanessajeff,

thanks for raising the issue and bringing our attention to it.

I'm afraid I can't replicate the issue at the moment. I'm currently using the latest version of the SuiteCRM 7 application, which is 7.14.3, and following the steps provided I have no duplicating issues:

image

If I press the duplication button from the Actions dropdown I get the expected result

image

Please try the latest version to replicate the issue.

You can access the demo website for that: https://demo.suiteondemand.com/

Thanks for your response in advance!

Regards, Serhii

pgorod commented 7 months ago

Sometimes these duplications are caused by a bad JOIN in the SQL of one of the queries. In those cases, the multiplication will be variable, from zero to many times, depending on the number of related rows in the related table that is not correctly JOINed.

So if any of you can find a pattern to the number of extra items, by looking at data from releated tables, that might help. For example, the number of products in the quote, or the number of email addresses in the contact, or the number of contacts in the account...

This might also help explain why the issue is not always reproducible.

serhiisamko091184 commented 7 months ago

Hi @pgorod,

thanks for sharing your suggestions, I'll try to have a closer look at those.

Many thanks!

Regards, Serhii