Rest Service in Appointment block

For Appointmnet module custom data fetch from rest services is not working properly.

It works properly for all the fields except countOfAppointments and unallocatedMinutes. Whenever any of these two fields is added it gives conversion error.Detail call is as below

Below rest call gives - converting class org.openmrs.module.appointmentscheduling.TimeSlot to org.openmrs.module.webservices.rest.web.representation.CustomRepresentation@41024373 error.

http://localhost:8080/openmrs/ws/rest/v1/appointmentscheduling/timeslot?appointmentType=4da187c6-c436-11e4-a470-82b0ea87e2d8&v=custom:(uuid,countOfAppointments)

Are you able to reproduce it here? https://qa-refapp.openmrs.org/

Yes, please check

With default it works fine

https://qa-refapp.openmrs.org/openmrs/ws/rest/v1/appointmentscheduling/timeslot?appointmentType=4da187c6-c436-11e4-a470-82b0ea87e2d8&v=default

With custom gives 500 internal server error

https://qa-refapp.openmrs.org/openmrs/ws/rest/v1/appointmentscheduling/timeslot?appointmentType=4da187c6-c436-11e4-a470-82b0ea87e2d8&v=custom:(uuid,countOfAppointments)

@vishi can you, again, just click on the above links and tell me what happens?

I have scheduled a provider(jake smith) for the service dermatology for 24th march 2021.

Now, if you will click the links you will see the error.

Earlier it was not showing any error because there was no provider scheduled.

Steps to reproduce error 1.go to https://qa-refapp.openmrs.org/openmrs/appointmentschedulingui/scheduleProviders.page

  1. Schedule a provider for any service (need to have UUID of it, currently using dermatology).

3.Try to fetch timeslot with v= custom having countofappointments

Hi, Dkayiwa Did you find something on this?

@vishi can you create a ticket for it?

Remember to share the url after creating the ticket. Then i will commit the fix.

Is there any reference on creating a ticket ?