-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Issue 4117 - Make distribution_quantity disallow 0 #4259
Issue 4117 - Make distribution_quantity disallow 0 #4259
Conversation
This looks OK to me - question is what we do for existing zero numbers? @cielf should we replace them with null? |
Hmm... I think that's the only thing that makes sense and that we're going to have to communicate to the affected banks. |
Ok. Thanks. I will work on getting a script created to update the |
Should there be a test for the update script? I feel like there should be? |
@pshong79 you'll want a migration here. And no, I don't think you need a test. It should be one line of code. |
@dorner Thanks! I initially thought it was a migration but recalled previously when I've done something like this to update current data in the database, I had used a script. I will go back go back to creating a migration. |
…ity=0 from 0 to null
Migration is done. I don't believe I need to commit my local |
Looks good to me! Will wait for @cielf to merge if there is communication that has to happen first. |
@dorner Thanks for the heads up re communication. I think we can handle it as part of the release announcement -- we don't need a pre-release note. So, merging. |
@pshong79: Your PR |
Resolves #4117
Description
The item quantity is being used to make some calculations in some reports. Because there some reports that use this value in some calculations, when a
0
is entered, a divide by 0 error is displayed.To address this issue, a change to one of the validations in the
items
model was made to only allow for numeric valuegreater_than 0
.Type of change
How Has This Been Tested?
Tested manually
Added test specific to item
distribution_quantity
to check for0
Screenshots
After: