Bug
PWA: range differs in most likely
Issue description
The client does not retrieve most likely options when extended selection is in use. This makes sense since it is eventually expensive and is never actually used. The bundle for the PWA on the other hand includes these in the computation of the range request URL. This is one of the differences which will cause the complex forms not to work offline.
Developer comments
This is tricky. It is complex, but the related code in JavaScript and PHP is also hard to understand. It became more difficult with offline capability and bundling. The exact range request that the form will issue needs to be predicted when the app bunde is created. The easiest would be to simply take all ranges sort them and create the range request url. But due to the intrsic complexity of Topincs due to its generic nature there is always another angle to consider. In this case it was performance issues that arose [8647, when selecting from movement data], e.g. all non-invoiced orders. Since these selections should always use the extended selection and the range should not be retrieved initially, i decided to abuse the most likely flag and set that to 0 aka false. This does not matter so much, since 1 means only really most likely when option count remains the unchanged/default. Overall this is messy. So most likely gained meaning in this whole process, also meaning do retrieve options upon form load.
This was cleaned up as much as was necessary to fix the bug. The ranges which should not be retrieved upon form load are now marked with the letter N in the most likely slot. This are extended selections where the option count is not \* which stands for all options. This allows an extended selection to work offline as long as the topic role constraint has an option count \*.
|
Work sessions2
Start |
2022-02-06T12:02:05
|
End |
2022-02-06T14:21:15
|
Participant |
Robert Cerny
|
Start |
2022-02-06T16:32:26
|
End |
2022-02-06T17:16:26
|
Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.