nus-cs2113-AY2021S2 / pe-dev-response

0 stars 0 forks source link

del lsn function is allowed to input repeated indices. #1277

Open nus-pe-bot opened 3 years ago

nus-pe-bot commented 3 years ago

del lsn function is able to input same indices and shows no error message del lsn.png


[original: nus-cs2113-AY2021S2/pe-interim#1277] [original labels: severity.Medium type.FunctionalityBug]

8kdesign commented 3 years ago

Team's Response

This is the intended behavior. The correct lessons are deleted while the duplicates are ignored. This was done to provide the best experience for the user.

As for why there isn’t an error message, we believe it isn’t an error in the first place, unlike those with index out of bounds. Putting multiple of the same index and putting just one tells us the same thing: You want to select the item at the index. Since it is a valid index, there is no reason why we need to make it an error.

In fact, putting an error would make things worse as the user may get confused about whether the action was successful or not.

Duplicate status (if any):

Duplicate of #1281