nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Error message when attempting order commands when order not listed #1004

Open nus-pe-bot opened 2 weeks ago

nus-pe-bot commented 2 weeks ago

image.png

In a situation like this where I am not allowed to do the edito command at all because I have yet to listo, I think it would be better if the error message was immediately that I need to listo first, rather than the validity errors of my fields. (A potential misuse case is someone who fixed the validity but realise that he cannot do this command at all in the first place)


[original: nus-cs2103-AY2425S1/pe-interim#1399] [original labels: severity.Low type.FunctionalityBug]

kaixuan477 commented 2 weeks ago

Team's Response

Firstly, this issue is unlikely to occur as users typically refer to existing orders before attempting to edit them, especially when the order index parameter is required.

Secondly, verifying the validity of command input before execution follows the standard convention for most applications, including AB3/SellSavvy (e.g., parsing before execution). Handling this command the same way as others is therefore consistent and not incorrect.

Thirdly, if a user tries to edit something without referring to any orders, does it matter if they have already corrected the format and made to retype? Such a case is unlikely to result in meaningful input. Users would likely need to retype the entire command anyway, and the timing of their understanding of the correct date format (before or after the retry) makes little difference. Additionally, Ctrl+C and Ctrl+V exist, making retyping less burdensome.

Lastly, implementing a change to validate input before parsing would require a significant overhaul of the logic, potentially affecting the other 12 commands in the system. This effort would be disproportionate to the negligible impact of addressing such a rare edge case. Instead, the time and resources spent could be allocated to developing two new commands. Therefore, this issue is clearly NotInScope and more of a suggestion for improvement rather than a bug.

Duplicate status (if any):

--