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

[BUG] able to enter negative values in distributions and donations. Shouldn't be able to #4487

Open
2 tasks
cielf opened this issue Jun 30, 2024 · 14 comments
Open
2 tasks
Labels

Comments

@cielf
Copy link
Collaborator

cielf commented Jun 30, 2024

Summary

Should not be able to have negative values for line items in distributions, donations, purchases, transfers, audits, kits

Why

Those values are just invalid in context.

Details

Note that there are line items where we should be able to have negative values, though. Specifically Inventory Adjustments and kit allocations. All other line items should not have negative values in them.

We consider this a high beginner difficulty -- manual testing it out will give you a lot of exercise of the system.

Criteria for completion

  • Cannot save with negative quantities in distributions, donations, purchases, transfers, audits, kits
  • Tests to confirm.
@cielf cielf added Help Wanted Groomed + open to all! Difficulty—Beginner labels Jun 30, 2024
@mgrigoriev8109
Copy link

Can I work on this @cielf ?

@topeogunleye
Copy link

topeogunleye commented Jul 2, 2024

Can I work on this @cielf ?

Hi @mgrigoriev8109, I would love to be able to join you on a video call, and see you work on this by sharing your screen. If we can collaborate, I'll love to do that also.

@cielf
Copy link
Collaborator Author

cielf commented Jul 2, 2024

@mgrigoriev8109 Please do!

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Jul 2, 2024
@mgrigoriev8109
Copy link

Sorry @topeogunleye , I don't have much bandwidth at the moment so I'm mostly trying to contribute asynchronously. Are you comfortable working in Ruby, or do you need some resources to familiarize yourself with the language?

In general open source projects are great learning opportunities - but it's helpful to have familiarity with a language before diving into a large codebase.

@topeogunleye
Copy link

topeogunleye commented Jul 2, 2024

Hi @mgrigoriev8109, Yes!, I have more than a year of working with Ruby and Ruby on Rails and more than 6 months experience of being a code reviewer for Ruby and Ruby on Rails projects. With this experience, I feel more than comfortable with Ruby.

@mgrigoriev8109
Copy link

@cielf Figured I'd ask about the other inputs in the codebase since this issue mentions most of them already.

So these questions are when a user is logged in as an Organization Admin ( [email protected] )

  1. When adding a New Partner Agency under Partner Agencies → All Partners, should the user be allowed to enter a negative quota?
  2. When adding a New Item under Inventory → Item Types, should the user be allowed to enter negative values for any of the fields ( Value per item, Quantities, package size )
  3. For kit allocations, should the user be allowed to enter a negative kit value and a negative quantity?
  4. When adding a new barcode item, should user be allowed to enter negative quantity?
  5. When adding a new storage location should user be allowed to enter negative square footage?

And then the follow-up question is if these fields also require validation, if I should add it in the same PR, or do a new PR.

@cielf
Copy link
Collaborator Author

cielf commented Jul 2, 2024

Thanks for catching these -- most are out of out of scope for this change,

@cielf
Copy link
Collaborator Author

cielf commented Jul 2, 2024

Kit allocations should be allowed to have a negative quantity, though. This represents a bank de-constructing some kits and putting the components back into inventory. Doesn't happen very often at all, but it can.

The rest should not be negative.

@cielf
Copy link
Collaborator Author

cielf commented Jul 2, 2024

And, I'll followup by checking the rest of those and putting any that aren't right in out backlog of issues (they'll mostly be Good First Issue fodder, I think.)

@mgrigoriev8109
Copy link

Sounds good. Just realized this issue only dealt with line items not being negative, some other ones can also be added to the backlog of issues might be:

Copy link
Contributor

github-actions bot commented Aug 2, 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 Aug 2, 2024
@cielf
Copy link
Collaborator Author

cielf commented Aug 6, 2024

Have checked the above, and added those that are not right to our deep backlog of issues to be written up.

@github-actions github-actions bot removed the stale label Aug 7, 2024
Copy link
Contributor

github-actions bot commented Sep 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.

@github-actions github-actions bot added the stale label Sep 6, 2024
Copy link
Contributor

Automatically unassigned after 7 days of inactivity.

@cielf cielf added Help Wanted Groomed + open to all! and removed stale labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants