out_of_order shows state at time of report, not after report #88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#78 introduced the out_of_order property in the GET API routes of the service logs. But it displays the state at the time of the report, not the out_of_order state introduced by the report. We would like to see it display the state of the checkbox when making the report:

The goal is for our machine support consoles project to show whether a report put the machine in service or took it out of service.

Basically the same as if we added the state of that out of order checkbox to this table already in the CRM:
We do have one very specific wish: that we can still POST without the out_of_order property. In this case the out_of_order state stays like it did before. But the out_of_order state should still show up in the GET /api/v1/machines/{id}/servicelogs endpoint, even if the POST didn't contain one.
We would like this because we want to be able to keep POSTing informational service log entries that don't do anything to the machine's out_of_order state (for example with situation MSC_UNCHECKED_TODO). But it is useful for the log table on our machine support consoles project (which shows out_of_order) to show whether somebody tried to use the machine while it was out of service.
We agreed to collaborate on this, with @Ference-Nieuwkerk creating the tests that outline the desired behaviour :)