Open Bawfen opened 1 year ago
No details provided by team.
[The team marked this bug as a duplicate of the following bug]
'filter f/price p/lt [price]' command is supposed to give me less than but also gives equals to
[original: nus-cs2113-AY2223S2/pe-interim#1051] [original labels: type.FunctionalityBug severity.Medium]
[This is the team's response to the above 'original' bug]
Filter can produce seemingly wrong results when item prices are more than 2 decimal places. This is because we allow more than 2dp pricing for advanced users who are selling in bulk but still want to keep individual items instead of groups of items. E.g. for a user selling 100 screws at $4.50, each Screw Item would have a price of $0.045. We made the change to display prices as 2 decimal places as there were complaints of allowing more than 2dp pricing, but we did not want to limit the options of advanced users.
A possible middle ground is to add a
For Advanced Users
section in relevant parts of the UG in the next iteration.However, as demonstrated, normal users setting prices to 2dp or less do not experience the bug.
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]
The system allows you to add items with prices below 0.01 (with 3 decimal places)
When calling filter, it returns the result when using the query "filter f/price p/gt 0"
While it is technically correct to return this to the user, I believe that it might be confusing as the amount shown in the result is equal to the "0" which was queried.
Perhaps it might be better to return an error when adding the item or show more decimal places in the filtered result?