rexyyong / pe

0 stars 0 forks source link

Threshold amount for groceries can be negative #16

Open rexyyong opened 5 months ago

rexyyong commented 5 months ago

Does not make sense since kailan cannot drop below a negative threshold amount

Input typed in

th kailan a/-1

expected output

exception thrown

actual output

kailan's threshold is now -1

Screenshots

image.png

nus-pe-bot commented 5 months ago

Team's Response

It is a duplicated issue of able to set threshold as negative amount.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Command th [GROCERY] a/[AMOUNT]: Able to set threshhold as a negative value

Screenshot 2024-04-19 at 5.15.31 PM.png Can set threshold for potatoes to -1


[original: nus-cs2113-AY2324S2/pe-interim#1481] [original labels: type.FunctionalityBug severity.Medium]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

We accept it as it is a bug, but it should not be medium as it appears only in very rare situations when the user enter negative value, as most user would not do this. But even so, the program does not crash and can still execute other functionalities. The only thing it affect is that this grocery is likely to not get categorized as low in stock after usage, but it causes a minor inconvenience only as the user is able to edit the threshold value again and all functionalities will still works as normal.

In conclusion, if threshold is set as negative intentionally, then it is likely to be a sabotage action as normally user would not want to set threshold to negative. Although our program did not reject this input, it did not affect other functionalities of the app.

In rare cases if user legitimately want to set threshold as negative, it might be because they don't want the grocery to be reminded as low in stock even if they are. Although the user can just omit the threshold value if they don't want it to be track, if they previously set a threshold value before and suddenly decide to don't want track, then they cannot unset it, so the alternative is to set it as negative. For example I bought chocolate again but now I only want to consume chocolate once in awhile so this time after I finish consuming, I don't want it to be shown as low in stock because I have a long list of other groceries to top up and to prevent temptations to buy even more chocolate. Then I can deliberately set the threshold as negative so that when i view the list of groceries low in stock, i won't see chocolate. In the future when I don't mind seeing chocolate, I can edit the threshold back to positive. Thus although we accept your view that we should not allow negative threshold, it doesn't crash the program or affect other functionalities, and instead the user can take advantage of it for their benefit. Nevertheless, we still accept it as a bug as it indeed cause minor inconvenience to the user and there can be a better way to do this.

If threshold is set as negative unintentionally, the user can always edit the threshold value easily with "th" command.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]


## :question: Issue type Team chose [`type.FunctionalityBug`] Originally [`type.FeatureFlaw`] - [x] I disagree **Reason for disagreement:** I believe that this is a feature flaw as the issue with allowing negative values for threshold is an issue of the feature being 'incomplete'. The functionality of the command still technically "works" it allows the addition of the negative value, just that it requires the improvement of blocking negative threshold values. Hence I believe its not a functionality bug but a feature flaw. ![image.png](https://raw.githubusercontent.com/rexyyong/pe/main/files/f2e6532b-26d1-4fba-b93b-5c9a078c6049.png)
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.VeryLow`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]