Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up unused base item fields #3993

Open
cielf opened this issue Dec 24, 2023 · 7 comments
Open

Clean up unused base item fields #3993

cielf opened this issue Dec 24, 2023 · 7 comments
Labels
core team Groomed but likely needs expert knowledge stale

Comments

@cielf
Copy link
Collaborator

cielf commented Dec 24, 2023

Summary

Some of the fields on base item are not used. Delete them.

Why

Avoiding future developer confusion

Details

Look at the super user base item form and the BaseItem model. They don't match. Check the fields that are not represented -- if they are not used in the system at all, then they should be deleted.

Criteria for completion

[] migration to delete the fields
[] all tests pass after migration

@cielf cielf added the core team Groomed but likely needs expert knowledge label Dec 24, 2023
@dorner dorner self-assigned this Jan 5, 2024
@dorner
Copy link
Collaborator

dorner commented Jan 5, 2024

@cielf so it looks like there are 2 fields that are null for everything (size and barcode_count). The problem is category, which is a string. It looks like there's no way to edit it, and new items don't have it (instead they use item_category_id). The problem is that for reporting, we're using this category field to indicate if an item is disposable or not. We definitely can't remove it now, but I think it exposes another issue, which is that whether an item should be considered "disposable", "cloth", or "adult incontinence" items should not be based on this field in base_items. (For one thing, orgs can create as many items as they like, and we're just not tracking them using this approach.)

I can remove those 2 fields for this issue and open another one for the category problem, or try to tackle it in here. Thoughts?

@dorner dorner assigned cielf and unassigned dorner Jan 5, 2024
@cielf
Copy link
Collaborator Author

cielf commented Jan 6, 2024

@dorner I think we clean up those two fields, but put a proto-issue in the backlog for the category problem, under "needs developer discussion". We do need a reliable way to determine whether an item is disposable, etc. Whether that is this (and we add setting the field for superusers) or putting some flags on the items or something else is TBD. I'm not sure I see the problem with using the base item field. Otherwise, what is base item for at all?

Which is a fine question in itself.

I have added the proto-issue.

Copy link
Contributor

github-actions bot commented Feb 6, 2024

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

Copy link
Contributor

Automatically unassigned after 7 days of inactivity.

@github-actions github-actions bot removed the stale label Mar 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

@github-actions github-actions bot added the stale label Apr 4, 2024
@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

This is waiting for some testing.

Copy link
Contributor

Automatically unassigned after 7 days of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core team Groomed but likely needs expert knowledge stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants