stockpile-co / api

The API for Stockpile, an app that manages stuff for organizations.
0 stars 1 forks source link

Allow custom fields to have multiple categories #301

Closed AdamVig closed 7 years ago

AdamVig commented 7 years ago

As a user, I want to be able to create a custom field that is enabled for multiple categories, but not all categories so that I can avoid having to create a duplicate custom field for each category that I want it to be enabled for.

AdamVig commented 7 years ago

@emroussel How do you want to specify categories when creating a field?

I can see two ways that could work:

  1. pass an array of category IDs as numbers
  2. pass an array of category objects, each containing a whole category entity (categoryID and name)

There's also the way that kit models are currently implemented, but I remember you mentioning that it's difficult to use.

emroussel commented 7 years ago

Right. If those are the only two options for now, we should probably go with the same way kit models are done.

Although, like the kit models, it would be easier if the app could simply send a new list of categories to replace the old one.

AdamVig commented 7 years ago

it would be easier if the app could simply send a new list of categories to replace the old one

I'm sorry, this is exactly what I was describing! I must not have communicated it well.

My question was about the format of the list of categories you will send to replace the old list of categories: whether they should be IDs or category objects.

emroussel commented 7 years ago

Oh haha my bad! Then, I think sending category objects would be a bit more straightforward, but it does not matter much.