out_of_order shows state at time of report, not after report #88

Open
opened 2026-06-10 12:03:22 +02:00 by Ference-Nieuwkerk · 1 comment
Contributor

#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:
image

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:
image

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.

#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: ![image](/attachments/cf6b08d5-b831-435a-bbaf-0535e5b6238c) 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: ![image](/attachments/d1b0c43a-f11f-4911-bbea-32793219c3bf) 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.
236 KiB
166 KiB
Owner

We agreed to collaborate on this, with @Ference-Nieuwkerk creating the tests that outline the desired behaviour :)

We agreed to collaborate on this, with @Ference-Nieuwkerk creating the tests that outline the desired behaviour :)
Sign in to join this conversation.
No labels
Draft
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
msl/intranet#88
No description provided.