BekahT / VetApp

A Java desktop application to be used in a veterinarian's office for managing clients, pets, and appointments.
0 stars 0 forks source link

Edit Pet #12

Closed BekahT closed 4 years ago

BekahT commented 4 years ago

Staff can edit an existing pet’s name, species, gender, and date of birth.

BekahT commented 4 years ago
BekahT commented 4 years ago
BekahT commented 4 years ago

Submit and Cancel buttons need to be consistent with others in application. See Add Pet or Add / Edit client buttons (blue text).

BekahT commented 4 years ago

Shrink error font to match size used in Edit Client.

BekahT commented 4 years ago

Shrink error font to match size used in Edit Client.

Resolved in bug fixes for Add Pet. Changed to font size 14 from 18.

BekahT commented 4 years ago
  • Need to revisit the validation on DOB in the Edit form. Right now we allow them to be empty and submitted with just the formatting. If a pet is edited to have a blank dob, edit and delete on them breaks. I was able to fix this in the add form using a regex, but for some reason it's not applying during the edit.
BekahT commented 4 years ago
cp-umuc commented 4 years ago

I can still edit a pet to have a date of birth in the future and the error message for empty date of birth field is different than for create pet ("All fields are required" vs "DOB must be in yyyy-mm-dd format!").

brease568 commented 4 years ago

Fixed the bug allowing a user to edit a pet's DOB into the future. I'm confused on your comment on the empty date of birth error message. If the date of birth field is left empty the error message should be "All fields are required." That seems right. The error message "DOB must be in yyyy-mm-dd" message should only be thrown if there is an invalid date (not including one in the future). I might have fixed this by adding missing return statements to two date validity checks that were added?

cp-umuc commented 4 years ago

It doesn't matter which error message we use - I just get two different error messages when I leave the DOB field empty in edit vs create and I think it should be consistent. Can you not reproduce the error messages being different in the two for empty fields?

Add - empty DOB

Screen Shot 2020-04-25 at 11 20 49 AM

Edit - empty DOB

Screen Shot 2020-04-25 at 11 21 18 AM

Looks like in Edit I can remove the dashes but in Add I can. Is the formatting being enforced differently?