Re: article name uniqueness

Hi Mattias,

I hope you’re ok I’m responding on the mailing-list. This way, others
can read about it in the future.

You mentioned the article name is required to be unique for a supplier
(as defined in app/models/article.rb), and found problems in at least
these cases:

  • A wholesale retailer has different units for the same product (e.g.
    350gr and 650gr of peanut butter).
  • A wholesale retailer has two brands for a product.

The idea behind requiring a unique name, is that most importantly the
name is shown to the user. If there are two equal products, this is
confusing. Regarding different units, I agree on that, and in the
foodcoop-adam fork we’ve relaxed that requirement. Regarding two brands,
I think it makes sense to have the brand in the name, since it is an
integral part of recognising the product, and is shown only in a popup.

What do you think?

  • Willem

Hi Willem,

Even better to have this conversation on the mailing-list.

I understand your reasoning, but in respect to the design of the database have a double feeling about it. I see that the product information like brand and quantity are presented in the frontend in the green ‘pop-up’ field. For me that would be enough to differentiate between two products with the same name.

I will give it a try with making the names unique by adding the brand name to it.

Thanks for the info!

Mattias

let’s continue here - just found an existing issue on this :slight_smile: I’m ok to
add unit and manufacturer.
https://github.com/foodcoops/foodsoft/issues/90