CC-436: Remove Client Notes from Manage Appointment Modal

Issue:

The Client Note Section has been removed from the Check In/Out (and Quick Complete) flows due to issues determining assignment of the Client Note record when completing Appointments with multiple Participants.

Client Notes can still be created at any point in the Appointment life-cycle using the Note quick action (where they can be assigned to a specific Participant) from Manage Appointment or from anywhere in the application using the Client Note action from the Maica Global Actions menu.

Changes:

  1. Remove Participants Note from Check In Screen
  2. Remove Participant Notes from Check Out Screen
  3. Remove Participant Notes as a Default Section option under Service Management Settings
  4. Remove the Participant Notes as Available Section option on Appointment Service record
  5. Remove the Participant Notes as a step in the Create Appointment Wizard

This has been replaced by the Manage Participant Notes feature that can be accessed anytime in the Manage Appointment modal and in the Planner on a single click of an Appointment (when the feature is enabled).

Additionally, the Manage Participant Notes feature was extended to provide the ability to insert a Note Template (see below).

Insert a template into a Participant Note

CC-462: Agreement Expiry Tolerance Logic Now Prioritises Active Agreements

Issue:

A bug was identified in the creation of Billable Notes where funding was incorrectly drawn from an inactive Agreement Item instead of the current active Agreement Item (and Service Agreement).

This issue occurred when an Agreement Expiry Tolerance (days) setting was both configured and disabled (set to 0), causing an expired Service Agreement within the tolerance period to be selected over the active one.

Resolution:

The logic has been updated to always prioritise the active Service Agreement and its associated Agreement Item, regardless of any Agreement Expiry Tolerance (days) settings.

When no active Service Agreement and Agreement Item exist, the system will then check the Tolerance Setting and attempt to retrieve an Agreement Item within the defined tolerance period.

Impact:

This fix ensures that Billable Notes are now correctly linked to the active funding source, aligning with the expected business rules and preventing unintended funding from inactive agreements.

CC-425: Appointments Assigning Unavailable Resources

Issue:

A bug was identified in the handling of Appointment scheduling for Resources with approved Unavailability records. When a Resource has an approved Unavailability record, Maica unschedules that Resource from an Appointment if the Unavailability record overlaps with the Appointment. However, the scheduled batch processes that create Appointment records did not adhere to this logic.

Scenario:

  1. The system generates Unavailability records through recurring Unavailability schedules or manual user entries.
  2. Appointment records are created via a recurring Appointment schedule.
  3. If the recurring Appointment schedule creates an Appointment after an Unavailability record has been approved, the Resource is still scheduled for that Appointment (if they are the designated Appointment Resource on the Master Appointment).

Expected Behaviour:

No Resource with an approved Unavailability record should be scheduled for an Appointment when the relevant setting is enabled, ensuring consistent and predictable system behaviour.

Fix:

A change has been implemented in the scheduled job that creates Appointment records. When an Appointment is created via the batch job, the system will now:

  1. Check Overlap Settings – Verify if the overlap check is enabled.
  2. Iterate through Appointment Resource records – Examine each assigned Resource.
  3. Validate Against Unavailability – Check if any Appointment Resource has an overlapping approved Unavailability record.
  4. Delete Appointment Resource – If an overlapping Unavailability record is found, remove that Resource from the Appointment.

Impact:

This fix ensures that Appointment scheduling aligns with user expectations by preventing Resources with approved Unavailability records from being scheduled, regardless of the timing of Appointment creation.

CC-439: Resource Availability Score does not factor in cancelled Appointments

Issue:

An issue was identified where the Resource Availability Score in the Find Resources feature of the Appointment modal was not updating to reflect cancelled Appointment records.

Previously, if a Resource was part of a cancelled Appointment, their Availability Score remained at 0%, even when they were actually available following the cancellation. This caused confusion when scheduling new Appointments, as the Resource would incorrectly appear as unavailable.

Fix:

With this fix, the Resource Availability Score now accurately reflects real-time availability, ensuring that cancelled Appointment records no longer impact scheduling decisions.

CC-464: New Appointments still being created on Cancelled Appointment/Schedule

Issue:

Appointments were still being generated on cancelled schedules due to a validation gap in the batch process.

Fix:

The batch process now respects the cancelled status of Appointments and Schedules, preventing unintended duplicate Appointments from being created.

CC-424: Travel Time defaults to 60 mins when no travel is required.

Issue:

An issue was identified where the Manage Travel component was defaulting the Travel Time to 60 minutes. If a user clicked Submit without adjusting this value, Maica would populate 60 minutes of travel time into the Appointment Travel Time field. This posed a risk of incorrectly charging or paying for travel that didn’t occur.

Fix:

  1. The default 60-minute value has been removed from the Travel Time field.
  2. Validation has been introduced in the Manage Travel feature to ensure that users manually enter a Travel Time before saving the record.

This update ensures that only actual travel time is recorded, preventing unintentional travel-related charges.

CC-457: Remove Fortnightly value from Frequency pick list

Issue:

The value Fortnightly has been removed from the Schedule Frequency Global Value Set due to issues being caused in the Recurring Appointment Schedule.

New Configuration for Fortnightly Schedules:

To create an Appointment Schedule on a fortnightly basis, the following configuration can now be used:

Frequency = Weekly.

Interval = 2

Please contact Maica Support if you have existing Appointment Schedule records with a Fortnightly Frequency, as we can rectify the data via a bulk operation.

Post Installation Script

This script retrieves 5000 Appointments max in one run where Schedule → Master → Original Start is not blank. It then analyses and removes Original values from all Masters and then from all other appointments where Original = Master Original, regardless of the status.

If you require assistance with installing or running this script, please contact Maica Support for guidance.

View Code

List<maica__Appointment__c> appointments = [SELECT Id, maica__Status__c, maica__Original_Scheduled_Start__c, maica__Original_Scheduled_End__c, maica__Appointment_Schedule__r.maica__Master_Appointment__r.maica__Original_Scheduled_Start__c, maica__Appointment_Schedule__r.maica__Master_Appointment__r.maica__Original_Scheduled_End__c FROM maica__Appointment__c WHERE maica__Appointment_Schedule__r.maica__Master_Appointment__r.maica__Original_Scheduled_Start__c != NULL LIMIT 5000]; Integer masters = 0;
Integer nonMasters = 0;
Integer nonCancelled = 0;
Integer cool = 0;
Set<Id> scheduleIDs = new Set<Id>();
List<maica__Appointment__c> appointmentsToUpdate = new List<maica__Appointment__c>(); for (maica__Appointment__c app : appointments) { if (app.maica__Original_Scheduled_Start__c == app.maica__Appointment_Schedule__r.maica__Master_Appointment__r.maica__Original_Scheduled_Start__c && app.maica__Original_Scheduled_End__c == app.maica__Appointment_Schedule__r.maica__Master_Appointment__r.maica__Original_Scheduled_End__c) { if (app.Id == app.maica__Appointment_Schedule__r.maica__Master_Appointment__c) { masters++; } else { nonMasters++; } if (!'Cancelled'.equals(app.maica__Status__c) && !'Completed'.equals(app.maica__Status__c)) { nonCancelled++; } scheduleIDs.add(app.maica__Appointment_Schedule__c); app.maica__Original_Scheduled_Start__c = null; app.maica__Original_Scheduled_End__c = null; appointmentsToUpdate.add(app); } else { cool++; }
} update appointmentsToUpdate; System.debug('Number of masters: ' + masters);
System.debug('Number of non-masters: ' + nonMasters);
System.debug('Number of non-cancelled/completed: ' + nonCancelled);
System.debug('Number of schedules: ' + scheduleIDs.size());
System.debug('Number of appointments to update: ' + appointmentsToUpdate.size());