foundations icon indicating copy to clipboard operation
foundations copied to clipboard

Works Orders API doesn't return correct status when it's `raisedToChase`

Open sprtk-ches opened this issue 1 year ago • 1 comments

Describe the bug If you create a work order with the status "Raised chase ever X Days", the API object has the status as empty instead of raisedToChase.

This behaves the same if the status is created through the API.

Also, is there a way to either pass the number of days or retrieve them through the API?

To Reproduce Steps to reproduce :

  1. Create a works order (Either through Agency Cloud or the API
  2. Set the status to 'Raised - Chase every X Days' (or raisedToChase through the API)
  3. Try to get fetch that record from the works orders API (/worksOrders/{id})
  4. Check the status of the response. It will be an empty string

Expected behaviour The status should be raisedToChase and (ideally) the number of days should also be available in a field

Screenshots image

Additional context

Here is the API result for the above example in the Sandbox (some data was removed for brevity) https://platform.reapit.cloud/worksOrders/MKT24000040

{
  "id": "MKT24000040",
  "created": "2024-08-07T08:35:06Z",
  "modified": "2024-08-07T08:35:06Z",
  "companyId": "",
  "propertyId": "MKT240948",
  "tenancyId": "MKT240452",
  "negotiatorId": "ADV",
  "typeId": "",
  "status": "",
  "description": "T",
  "reporter": "",
  "priority": "",
  "booked": "2024-08-07",
  "required": null,
  "completed": null,
  "totalNetAmount": 0,
  "totalVatAmount": 0,
  "totalGrossAmount": 0,
  "items": [ ],
  "extrasField": {},
  "_eTag": "\"762D62AB85F59B9462C0108F9E74CA87\"",
  "_embedded": null,
  "metadata": {}
}

As you can see, the status is empty and the number of days to chase isn't anywhere.

Also, can we make the Works Order id clickable in Agency Cloud - like every other field? Talking about this part image

sprtk-ches avatar Aug 07 '24 09:08 sprtk-ches