Open nus-se-script opened 3 days ago
Justification for Severity.low: Rare likelihood of case-sensitive product names It is unlikely that businesses or users would intentionally use case-sensitive product names to differentiate between items (e.g., water and Water as separate products). This is not a standard practice in real-world inventory systems. Example: Even brands with specific capitalization styles (e.g., iPhone) are usually recognized case-insensitively in systems.
The course website suggests that duplicate detection should account for likely scenarios where two entries are functionally the same despite minor formatting differences (e.g., case differences). Similar to John Doe vs. john doe being likely the same person, water vs. WATER is also likely the same product.
While the UG does not explicitly mention case-insensitive duplicate handling, this does not lead to a major inconvenience for users. Instead, it prevents potential accidental duplicates, aligning with best practices. Indeed, the UG will be better if updated in future versions to clarify the behavior.
--
Steps to reproduce: 1) Type in
add_product n/water
Output: Product is successfully added.
2) Then type in
add_product n/WATER
Output: Command box displays an error saying product already exists.
It seems like the application does perform some sort of duplicate handling here since
water
andWATER
are deemed as the same product. However, that behaviour is not advertised anywhere in the UG. Therefore, it is misleading for users as they are not told how duplicates are checked and handled.I have tagged this as medium because in the real world product names are generally case sensitive. Therefore, to handle such inputs via (I assume to be case insensitive duplicate handling) can prevent users from adding products that may have the similar brand names, with differences in its formatting.
[original: nus-cs2103-AY2425S1/pe-interim#1130] [original labels: severity.Medium type.FeatureFlaw]