nus-cs2103-AY2122S2 / pe-dev-response

0 stars 0 forks source link

Incorrect error message when attempting to add the same book with different Isbn number. #3433

Open nus-pe-bot opened 2 years ago

nus-pe-bot commented 2 years ago

Screenshot 2022-04-16 at 2.54.48 PM.png

Description: I add 2 books with same details and attempted to add another book with same details except with different ISBN and received an incorrect error message.

Step to reproduce: book add n/Introduction to Algorithms a/Cormen a/Leiserson a/Rivest a/Stein i/9780371888506 t/ComputerScience

book add n/Introduction to Algorithms a/Cormen a/Leiserson a/Rivest a/Stein i/9780371888506 t/ComputerScience

book add n/Introduction to Algorithms a/Cormen a/Leiserson a/Rivest a/Stein i/9780371888507 t/ComputerScience

Expected: Error message stating book exists but ISBN number is wrong.

Actual: Error message stating constraints of ISBN number.


[original: nus-cs2103-AY2122S2/pe-interim#3504] [original labels: severity.Low type.FunctionalityBug]

bingsen0806 commented 2 years ago

Team's Response

First of all, the error message is correct and quite clear. This is because your isbn number 9780371888507 is not a valid ISBN (as can be verified from the website). It is a very specific error message that our app is telling you that your ISBN is incorrect.

image.png

Secondly, even if your isbn is correct, our app accepts books with the same name, authors and tags, but different ISBN (which is what you are trying to input). This is in-line with real world example. Two books of Harry Potter, written by the same author, can have different ISBN because one is hardcover, and the other is softcover, or because they are printed in different years.What is not accepted is books with the same isbn, but have different names, or authors.

In conclusion, this bug is not accepted firstly because the ISBN is you input is not valid in the first place (hence our error message is accurate), and secondly, the expected test case you state is wrong, as explained in second paragraph.

Duplicate status (if any):

--