Open danvanhorn opened 5 years ago
I was able to fix F8 as the in_use
flag was still false even though it had an open batch and task. I just flipped the value in the database. Unsure how it got into this state. It appears as of right now F243 is fine and also has an open batch so I can't play around with it.
Just to be clear, the immediate issue is resolved 😅
The root cause of this can be seen starting at: https://github.com/brewhops/app/blob/99f4cd3caac6e48fbb9c9d934482837022d3a55d/src/components/tank-info/data-entry.vue#L197
As we have talked about, we need to start consolidating actions in the backend. If the close batch request completes and the tank update doesn't we get left with a state that causes this problem. So, the close batch should handle this. However, as we have a fairly restful architecture on the backend right now this proves semi-difficult/not within the design pattern. To properly resolve this we should create an abstraction level between api controllers and direct data manipulation, this way other controllers can more easily manipulate other tables.
In production, when a batch is closed in tank F8 and F243 do not revert to the correct available status. We will need to research why this is happening and fix it because it is affecting our current customers and causing confusion and lack of confidence in our product.
This is likely a data issue and we will possible need to look closely at the database to root out any inconsistencies.
Steps to reproduce: Go to tank monitoring page and look at tank F8.
Click on tank F8.