keeleinstituut / tv-tolkevarav

Tõlkevärav (Translation Hub)
1 stars 0 forks source link

Endpoint fix (BE) #745

Open MariusJulius opened 2 months ago

MariusJulius commented 2 months ago

Related to: #521

Description from slack: I’m having some trouble using /workflow/tasks/{id}/complete endpoint to finish or send back REVIEW type tasks. I have tried sending the accepted field with true/false or 0/1 but get errors like: "The accepted field must be true or false." or "Server Error" respectively curl.txt

2 issues:

MariusJulius commented 2 months ago

Can't mark as done or send back to previous step as tested in FE ticket: https://github.com/keeleinstituut/tv-tolkevarav/issues/521

Example order: LOL-2024-04-T-453

MariusJulius commented 2 months ago

Can't mark as done or send back to previous step as tested in FE ticket: https://github.com/keeleinstituut/tv-tolkevarav/issues/521

Example order: LOL-2024-04-T-453

MariusJulius commented 2 months ago

Happens when done from my task view.

MariusJulius commented 1 month ago

Needs cluster access as locally it worked for Dima.

kadmit commented 1 month ago

@MariusJulius @plakitkelly

I checked the issue and found out that the project LOL-2024-04-T-453 has already been accepted.

I'll move the task to Ready for testing and will wait for the new case.

plakitkelly commented 1 month ago

@kadmit LOL-2024-06-KT-477

kadmit commented 1 month ago

@plakitkelly @MariusJulius From what I see currently there is a problem with validation. It's an FE issue. FE passes the boolean as true/false and when we retrieve it on the BE it converts to strings "true"/"false", but BE accepts 0/1. @MariusJulius please create a FE task for it.

KaarelKa commented 1 month ago

@kadmit Is this also the case for other POST requests (to other endpoints) that accept boolean values ? I remember we had some discussion about it with Markus and then I understood that GET requests should use 1/0 and PUT/POST requests should use true/false.

If this is not the case, then I can just change everything to 1/0

kadmit commented 1 month ago

@KaarelKa Yeah, otherwise I would prefer to do the fix on the BE instead 🙂

KaarelKa commented 1 month ago

@kadmit Okay all good, I'll change everything to 1/0 and test it. Will let you know if I find any place that is still expecting true/galse

plakitkelly commented 2 weeks ago

Still can't mark as done or send back to vendor. https://dev.tolkevarav.eki.ee/projects/my-tasks/3e7d58ef-2d45-11ef-bee5-12bebf730d77#LOL-2024-06-KT-502-af-ZAam-ET-1/2.1 my PIC

422 Unprocessable Content

MariusJulius commented 2 weeks ago

FE task: https://github.com/keeleinstituut/tv-tolkevarav/issues/778

plakitkelly commented 2 weeks ago

Tested in 20.06 - It's OK