nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

Bug or Feature Flaw that causes other features to malfunction #347

Closed Bentimate closed 1 year ago

Bentimate commented 1 year ago

Currently, our TP's delete command supports deletion of multiple index at once, and an undo command which allows users to undo the previous command.

correct case: good

However, we have a problem where if the user enters duplicated index, the program will take the first index it sees and deletes it, but the command output box will not be cleared. This is due to not accounting for duplicates in the code. wrong case: bad

This also causes the undo command to break and unable to be used properly.

This seems like a feature flaw, but this also causes other features to malfunction. Can this then be treated as a bug, or can we only mention this in the planned enhancement?

Here are some possible fixes, unsure if they are allowed:

  1. Throw new error messages to disallow duplicate index
  2. Allow duplicate index, but command output will be changed
damithc commented 1 year ago

@Bentimate The current behavior for delete 1 1 seems to be incorrect. Either of the proposed fixes can be allowed.

Bentimate commented 1 year ago

Thanks prof!