tanyjnaaman / pe

0 stars 0 forks source link

Book names should allow other characters like " and - #5

Open tanyjnaaman opened 2 years ago

tanyjnaaman commented 2 years ago

Book names are varied. The documentation indicates that special characters like ' and : are permitted, but a reasonable argument can be made that plenty of books with compound words e.g. "happy-go-lucky" or double quotations are reasonably frequent. In application to a book-tracking task, a user shouldn't be expected to not be able to key in these books, or manually "translate" these titles into an appropriate format.

soc-pe-bot commented 2 years ago

Team's Response

Thank you for reporting this bug, we are accepting this.

As per module website, overzealous input validation is considered as feature flaw, not functionality bug.

We agree that users should be able to input such books without manually "translating" the book title to the appropriate format. However, we are marking this as low because this does not happen often. Furthermore, "translating" such input does not affect the usage of the app by a lot. For example, if the librarian always replaces hyphen with space, and adds the book as 'happy go lucky", he/she will only refer to this name for future commands and there is no need for her to remember the original name (and he/she probably won't remember the original name of the book she added 1 month ago during his/her work). When editing books or borrowing books, for example, index is what that matters (the name stored does not affect functionality), and when a student says: "Can you find me the book happy go lucky?" for example (humans dont speak hyphens), she can search for the "happy go lucky" and still find the book. Nevertheless, we acknowledge that there is inconvenience posed to the librarian under some circumstances (and hence why we are accepting).

However, the case stated is not "reasonably frequent" and is in fact rare. Take the example from NUS libraries, in the example below we see that there are more than 221 million books.

image.png

Among them, only 12 books contain the character "-" or " in its title, as shown below. This is 1 out of 18 million.

image.png

Items for the Tester to Verify

:question: Issue type

Team chose [type.FeatureFlaw] Originally [type.FunctionalityBug]

Reason for disagreement: I simply provided 2 examples of reasonable characters, like " and -. Other relevant characters include ?-|'()*&^%$#@!.

Among these characters, and by the following definition of what counts as a functionality bug vs. feature flaw, I am making the case that the check for these characters isn't one that is "overzealous", nor does it cause particular inconvenience. The team has permitted the use of ":" and single quotations, and a look at their code suggests a simple REGEX validation is being used.

image.png

image.png

To add these special characters would simply be expanding this REGEX validation - unlike the fair case where "/" is excluded since it's used as a command argument delimiter.


:question: Issue severity

Team chose [severity.Low] Originally [severity.Medium]

Reason for disagreement: [replace this with your explanation]