Open nus-pe-bot opened 5 months ago
This is our intended behaviour. In our UG, we mentioned that we intended to sort the price by lexicographical ordering, not by the exact value of the price, as for the price of products, there is no fixed quantity (e.g. bag, litre, kg etc.), so the prices themselves are not comparable against each other. So, our intended behaviour is to perform a lexicographical search through the whole price of the item.
--
Steps to reproduce:
/add-supplier ; name : S1 ; phone : 98673098 ; address : Meow Street 24 ; email : ilovewombatstoo@gmail.com ; product : kibble ; price : $13/bag
/add-supplier ; name : S2 ; phone : 98673098 ; address : Meow Street 24 ; email : ilovewombatstoo@gmail.com ; product : kibble ; price : $5/bag
/add-supplier ; name : S3 ; phone : 98673098 ; address : Meow Street 24 ; email : ilovewombatstoo@gmail.com ; product : kibble ; price : $52/bag
/add-supplier ; name : S4 ; phone : 98673098 ; address : Meow Street 24 ; email : ilovewombatstoo@gmail.com ; product : kibble ; price : $98/bag
/sort ; field : price
.Expected: The sorting order should be S2, S1, S3, S4.
Observed: The order is S1, S2, S3, S4.
[original: nus-cs2103-AY2324S2/pe-interim#4152] [original labels: type.FunctionalityBug severity.Medium]