nus-cs2103-AY2021S1 / pe-dev-response

0 stars 0 forks source link

Behaviour for findexact command using multiple name keywords #4005

Open nus-pe-bot opened 3 years ago

nus-pe-bot commented 3 years ago

Searching orange and orange2 will return stock with name orange 2 since only orange 2 is valid.

image.png

image.png

However searching two valid input orange2 and orange3 returns nothing. image.png

image.png

I think when searching for orange2 and orange3, both stocks should be displayed in order to maintain consistency?


[original: nus-cs2103-AY2021S1/pe-interim#3775]

Ashley-Lau commented 3 years ago

Team's Response

Reasons for rejection:

  1. The command in the screenshots is "find", but in the title is "findexact". "find" and "findexact" are different.

  2. The bug cannot be reproduced based on the screenshots but we will try to infer what the tester is saying.

  3. The intended behaviour for "find" when you search for "find n/orange orange2" is that a stock with name that contains all the keywords entered will be shown. In other words, the stock with a name that contains "orange" and "orange2" will be shown (eg. a stock with the name "orange2" will be shown). This behaviour is consistent in the case where you do "find n/orange2 orange3", only stocks with name that contains "orange2" and "orange3" will be shown. The stock with name "orange2" does not contain "orange3" in its name, hence, it will not be shown. This behaviour is to prevent showing many stocks when the user types multiple keywords, such as "find n/orange3 some other random keywords", and is especially useful when there are many stocks.

The behaviour is also clearly stated in the user guide. The sentence that describes the find command and the search criteria.

image.png

The behaviour is also clearly stated in the developer guide under find's design consideration.

image.png

Hence, the behaviour is consistent and there is no bug.

Duplicate status (if any):

--