reapit / foundations

Foundations platform mono repo
57 stars 22 forks source link

Organisations service generating duplicate tags for office groups for the same organisation #6675

Closed plittlewood-rpt closed 2 years ago

plittlewood-rpt commented 2 years ago

Describe the bug The organisations service is currently generating duplicate tags for office groups for the same organisation which means that users in the different offices are ending up with the same customer id (including the office group tag)

To Reproduce Steps to reproduce the behaviour eg:

  1. Use the POST /organisations/{id}/officeGroups endpoint passing a payload with a similar name multiple times eg (Chiswick, Chiswick Sales, Chiswick Lettings, Chiswick Land and Farms)
  2. The service should save the office group but could return a duplicate tag as we seem to be omitting a duplicate check somewhere (likely in the Reapit.Packages.Extensions package's GetAbbreviationSuggestions method)

Expected behaviour No duplicate tags should be possible for the same organisation. Note that duplicate tags across different organisations IS acceptable.

Specification

github-actions[bot] commented 2 years ago

Thank you for taking the time to report a bug. We prioritise bugs depending on the severity and implications, so please ensure that you have provided as much information as possible. If you haven’t already, it really helps us to investigate the bug you have reported if you provide ‘Steps to Replicate’ and any associated screenshots. Please ensure any personal information from the production database is obscured when submitting screenshots. This issue will be reviewed in our weekly refinement sessions and assigned to a specific project board. We may also update the ticket to request additional information, if required. For more information on our processes, please click here