Fixing issue where inputting an expiration date for water causes the app to crash.
BRANCH NAME
issue_221_water_expiration_crash
RELATED ISSUES
Closes #221 (closed);
SUMMARY OF ISSUE/BUG
When you scan a bottle of water, after getting past SelectItemFragment and arriving at SelectPrintedExpirationDate, when you input an expiration date for the water and you hit accept, the app crashes.
DESCRIPTION OF UPDATE
The app was crashing when water was scanned because water has mostly null values for shelf lives, with the exception of a single "Indefinitely" entry. The code needed to be updated to check for this Indefinitely entry.
STEPS TO TEST
- Go to the 'Check Expiration Date' feature within the app.
- Scan or enter a barcode -> you will be taken to SelectItemFragment or ConfirmItemFragment
- Input Brand Name
- Input Description
- Select 'Beverages' as the "Category"
- Select 'Water' as the "Product"
- Select 'commercially bottled' as the "Type"
- Hit Accept -> you will be taken to SelectPrintedExpirationDateFragment
- Select a random date.
- Press 'Accept' -> you should be taken to DisplayTrueExpirationFragment
Confirm that upon arriving to DisplayTrueExpirationFragment that the app hasn't crashed.
NOTES
N/A
LABELS
NEST
component:check-expiration-date
type::bug
status::doing
Edited by A H