theharrisonmoore / earwig

A reviews platform giving a voice to construction workers
https://earwig-work.herokuapp.com/
2 stars 0 forks source link

I cannot add a company to Companies because it has already been mistakenly added to Agencies #1041

Open theharrisonmoore opened 4 years ago

theharrisonmoore commented 4 years ago

@thejoefriel I cannot add a company (Danny Sullivan Group) to the list of Companies because it has already been mistakenly added to Agencies. I tried deactivating it in the agencies list but I still cannot add it to the Companies list.

This must be fixed because Danny Sullivans is one of the companies on the Skanska pilot and users will be trying to give reviews about it.

thejoefriel commented 4 years ago

Hi @Harrison just on this to check, are you saying you mistakenly added this as an agency or your added it as a company but it stored it as an agency?

thejoefriel commented 4 years ago

Also, the reason you can't add a new one is because the name already exists. I've changed the name of the incorrect agency and deactivated it. I've then added Danny Sullivan Group as a company which it has successfully done

Depending on the answer to my question above, this doesn't seem like a bug to me as opposed to a slight iteration on the functionality you need. I initially see three potential options to tackling this:

  1. We add a feature for admin to be able to edit the type of organisation (however, this would need to come with the warning that all related reviews if any would be deleted )

  2. We update the code to allow for organisations with duplicate names to exist as long as they are different categories (not sure if that would be confusing?)

  3. We update the code to allow you to add an organisation with a duplicate name as long as any others with the same name are deactivated.

As admin, you're very much the user here @theharrisonmoore :) So let us know what you think you'd prefer and we can look to add to the backlog. It could be all three of course!

theharrisonmoore commented 4 years ago

@thejoefriel thanks. To answer your first question, I accidentally added Danny Sullivan as an agency then realised it was a company.

Answering your second question, you're right, it's not a bug, and I think the best way forward would be option 2: allow duplicate names to exist across entity types. I know of a few agencies that have the same name as payrolls, for example, and I'm sure there has to be companies that have the same name or at least the same acronym.

Shall I add this is a backlog issue?

theharrisonmoore commented 4 years ago

@thejoefriel Mind you, thinking about this now, this could result in users adding loads of the same entity when they can't find it.

That said, we have to assume that users will frequently wrongly categorise entities they add. So we do need a way to re-categorise entities. I'm just thinking… couldn't we use the existing 'merge' feature to rectify this?