Open m1oojv opened 12 months ago
As indicated in the duplicate issue, setting 0 as the index yields an invalid format since it is indicated that the index must be positive. Only after that condition is met, then the application check for valid values, in this case index of 100 is invalid.
[The team marked this bug as a duplicate of the following bug]
Error message could be more specific for index 0
When index 0 is used it shows invalid command when instead it should probably show invalid index.
Invalid command:
Invalid index:
[original: nus-cs2103-AY2324S1/pe-interim#240] [original labels: severity.Low type.FeatureFlaw]
[This is the team's response to the above 'original' bug]
Hi tester. It is indicated in the output that the index must be a positive integer. Hence, the formatting error raised in the first screenshot is valid since 0 is not a positive integer. As per the UG under Features notes, the app checks for format first before checking the validity of values:
For your second screenshot, since the format is accurate (13 is a positive integer), the application does not raise a formatting error. Since the index is out of range, an invalid index error is raised. As such, the output that you observe is intended.
Items for the Tester to Verify
:question: Issue duplicate status
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: The original bug deals with the spec command.
This issue deals with edit command.
Since one can be fixed independently of the other (since you're dealing with 2 different commands and different command parsers), they are not duplicates (as per the module website).
Prof has also justified this in the forum that this should not be duplicates as fixing one does not automatically fix the other.
both commands have invalid index as error but inconsistent - confuses user