OpenNutriTracker icon indicating copy to clipboard operation
OpenNutriTracker copied to clipboard

Bug: App allows saving a food with nonsensical or inconsistent nutritional information

Open LeticiaMonteiroo opened this issue 7 months ago • 2 comments

Bug description: The app permits users to save a food item even when the nutritional information provided is illogical or inconsistent (e.g., zero calories but non-zero amounts of macronutrients).

Expected behavior: The app should validate nutritional data to ensure logical consistency before allowing the food to be saved. For example, calories should correspond to the macronutrient values, and values should not be negative.

Environment: Android

Possible solution: Implement validation rules to check for consistency in nutritional data and reject entries that don’t make sense.

Bug description: The app allows users to save a food item even when the provided nutritional information is illogical or inconsistent (e.g., zero calories but non-zero amounts of macronutrients).

Expected behavior: The app should display a warning when nutritional data appears inconsistent, such as calories not matching macronutrient values or negative values. However, the user should still be able to proceed with saving the item if they choose to.

Environment: Android

Possible Solution: Implement consistency checks for nutritional data and display a warning, when inconsistencies are detected. The warning should inform the user about the potential issue but still allow them to proceed.

LeticiaMonteiroo avatar May 17 '25 02:05 LeticiaMonteiroo

Regarding this topics: instead of rejecting inserting the faulty item please offer a re-calculation to make values consistent. For example estimate missing kcal from provided carb/fat/protein amount. Background is that very often I need to enter new food with known grammage, but still unknown nutrient facts so I simply submit invalid values and change them later. So please don't do the application too smart and only display a warning with possibility to calculate missing values if possible. Refusing to add new value is just annoying and causes wasting lots of time of the user. Keep freedom to the users and just warn.

Kopromaster avatar May 18 '25 09:05 Kopromaster

For custom entries I disagree with rejection. Warning makes sense. Granularity og individual macros should be up to the user and not restricted by the app. For example if you only have goals for protein and calories then you might not care if custom entries reflect carbs or fats

MartinBR24 avatar May 24 '25 11:05 MartinBR24