salesagility / SuiteCRM

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

v8 API returns duplicates #8503

Open diligentDE opened 4 years ago

diligentDE commented 4 years ago

Issue

Requests {{baseurl}}/Api/index.php/V8/module/SecurityGroup?filter[deleted][eq]=0 and {{baseurl}}/Api/index.php/V8/module/SecurityGroup return duplicate entries.

Expected Behavior

Each security group should be returned exactly once (confirmed with rest v4).

Actual Behavior

The request returns the list of security groups, but most items are included multiple times. It seems like that a group is added again for each user that is related to it (example: a security group contains 5 users. the response contains this security group 5 times instead of once).

Possible Fix

Steps to Reproduce

  1. create 2 security groups
  2. add 3 users to each security group
  3. run the request
  4. the resulting json contains each security group multiple times

Context

This issue has impact on 3rd party integrations.

Your Environment

Mac-Rae commented 4 years ago

Hi @diligentDE,

This issue has been confirmed to exist and is replicable in the latest 7.10.x version.

Thanks :+1: