Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix appointment bugs #166

Conversation

simbayippy
Copy link
Collaborator

@simbayippy simbayippy commented Nov 4, 2023

This PR contains fixes for 7 main things

A:

Appointment message for add, delete, edit Appointments now shows the appropriate message upon success

B:

edit_appointment command now fixed to check for appropriate cases of:

  1. if only description changed, do not check if doctor & patient has same appointment
  2. if time of appointment changed, check if doctor & patient has appointments on those times
  3. if both changed, check if this Appointment already exists

C:

updated doctor's appointment list to contain edited appointment after calling edit_appt command. used to cause major bug that breaks application when the following commands are done in sequence

  1. edit appointment details
  2. attempt to delete appointment. break caused, as doctor's appointment list did not contain the updated appointment

D:

fixed issue when editing a person's name does not change the appointments name

E:

fixed issue where after editing a person, his appointment details are lost in db.

F:

updated add appointment command to only accept timings between 9am to 5pm.

G:

changed appointments such that each timeslot can only have 1 appointment. i.e. 2 different doctors cannot have appointments on the same timeslot

Issues fixed and closed:

#125 #126 #128 #131 #133 #136 #139 #147 #149 #151 #153 #154 #156 #159 #163 #164

Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Merging #166 (01c34a4) into master (b75da9b) will increase coverage by 0.37%.
The diff coverage is 65.43%.

@@             Coverage Diff              @@
##             master     #166      +/-   ##
============================================
+ Coverage     66.70%   67.08%   +0.37%     
- Complexity      679      698      +19     
============================================
  Files           116      116              
  Lines          2658     2716      +58     
  Branches        288      309      +21     
============================================
+ Hits           1773     1822      +49     
+ Misses          790      787       -3     
- Partials         95      107      +12     
Files Coverage Δ
src/main/java/seedu/address/logic/Messages.java 95.83% <100.00%> (+21.36%) ⬆️
...java/seedu/address/logic/commands/EditCommand.java 94.87% <100.00%> (+0.53%) ⬆️
...in/java/seedu/address/logic/parser/ParserUtil.java 95.29% <100.00%> (ø)
...main/java/seedu/address/model/ClinicAssistant.java 80.00% <100.00%> (+0.54%) ⬆️
src/main/java/seedu/address/model/Model.java 100.00% <ø> (ø)
...rc/main/java/seedu/address/model/ModelManager.java 86.31% <100.00%> (+0.44%) ⬆️
...a/seedu/address/model/doctor/UniqueDoctorList.java 34.78% <ø> (-1.39%) ⬇️
...c/main/java/seedu/address/model/person/Person.java 67.74% <100.00%> (+0.70%) ⬆️
...du/address/model/timeslots/UniqueTimeslotList.java 75.00% <ø> (-0.52%) ⬇️
...dress/storage/JsonSerializableClinicAssistant.java 100.00% <ø> (ø)
... and 6 more

@simbayippy simbayippy changed the title fix appointment success message fix appointment bugs Nov 4, 2023
@simbayippy simbayippy self-assigned this Nov 4, 2023
@simbayippy simbayippy added type.bug Something isn't working type.enhancement New feature or request priority.high labels Nov 4, 2023
@simbayippy simbayippy added this to the v1.4 milestone Nov 4, 2023
Copy link

@tohpinren tohpinren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still some big issues with the bugs - especially regarding edit appointment

.append(appointment.getDescription())
.append("\n")
.append("Date: ")
.append(" | Date: ")
.append(appointment.getDateTime());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this appointment datetime string to "01 Jan 2024 09.00AM" format?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure! just added

@tohpinren
Copy link

LGTM previous issues were fixed

@tohpinren tohpinren merged commit a70dc42 into AY2324S1-CS2103T-W09-3:master Nov 8, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.high type.bug Something isn't working type.enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants