Add name constraint on labels, items and locations to avoid duplication #933
Replies: 2 comments 9 replies
-
I agree that the scenario described is a problem, but I don't think creating a database constraint to prevent duplicate item_names is a realistic solution (or feasible). I would posit that after clicking Create / Create and Add Another, there should be a warning dialog / prompt informing the user that an item with the specified item name already exists and asks for confirmation before creating the item. |
Beta Was this translation helpful? Give feedback.
-
While I understand the motivation behind this request, I believe enforcing a unique constraint on item names would create significant limitations for more advanced use cases. In my setup, I often store identical items in different locations — for example, the same type of screw in multiple boxes. I also manage similar items under the same name but differentiate them visually using photos (e.g. different materials or manufacturers). For me, the item name alone is not a reliable unique identifier, and enforcing uniqueness based only on that would prevent me from properly organizing my inventory. A better approach might be to add an optional duplicate warning or suggestion when creating a new item — e.g. “An item with a similar name already exists, do you want to check it?” — rather than blocking the creation entirely. In short: a hard uniqueness constraint would make Homebox less flexible for more complex or real-world storage workflows |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the problem you are trying to solve with this feature?
Sometimes, I create items that are already there, without any warnings, I simply create something that I have already created before, I use it to manage my bolts and nuts, so the size difference in name is easily gotten mix, if there were a error message when I am trying to create something that have been there, it would be useful.
What is the solution you are proposing?
Add a unique constraint in the database.
Pass the error to the frontend once constraint violated.
What alternatives have you considered?
If there is a warning message, it will help as well.
Additional context
No response
Contributions
Beta Was this translation helpful? Give feedback.
All reactions