nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Empty `rate` Field Prompts Irrelevant Command Exception #804

Open nus-se-script opened 1 week ago

nus-se-script commented 1 week ago

Description

The r/ field should not be empty is not alerted to the user.


Steps to Reproduce

  1. Attempt adding a user with the r/ field empty.
  2. Observe that the result display returned does not address the issue.

    Expected Behavior

    Users should be prompted of the empty rate field when inputting an empty r/.

Actual Behavior

However, the result display only reminds user that the decimal place should be at most two and within the price range specified by the program.

Additional Information

Input: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 t/Sunday-1000-1200 s/Mathematics r/ paid/6000 owed/3000 Output: Screenshot 2024-11-15 at 4.45.28 PM.png


Suggested Improvement

Consider throwing another command exception in the case of that field being empty.


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

Feng1231 commented 1 week ago

Team's Response

Thank you for your input. We felt that this is of a lower priority than what we have done in v1.6.

We felt that our help message is quite specific to tell user what is an acceptable input for our r/ field. When we think in the user's perspective, upon seeing the message Rate should ... and 1. at most 2 decimal places and 2. is between the range of ...

We felt that the user should be able to understand quite clearly that the input should not be blank.

We thought about a new user that does not know any constraints about this application, and when the user types in add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 t/Sunday-1000-1200 s/Mathematics r/ paid/6000 owed/3000, we feel that between these two options:

  1. be reminded with r/ should not be empty which has no other information about the actual constraints of RATE, OR
  2. be reminded with our current error message, which tells you exactly how you should enter the RATE

The user might prefer the 2nd option more, as it tells the user more information.

Of course, your suggestion is valuable to our team in terms of improving the user experience for UGTeach, and we will consider improving this in the future iteration, by telling user that it should not be empty.

Duplicate status (if any):

--