metasfresh / metasfresh-webui-frontend-legacy

metasfresh Webui Frontend
GNU General Public License v2.0
57 stars 35 forks source link

Wrong Action parm when recording fast #1331

Open metas-mk opened 7 years ago

metas-mk commented 7 years ago

Is this a bug or feature request?

Bug

What is the current behavior?

When starting an Action and clicking into a field before the first/ initial green save bar has been "finished" (not even half) and changing the field content, then the action is starting with the wrong parm when started. Seems as if the frontend has not transferred the change to API.

Which are the steps to reproduce?

See above. https://w101.metasfresh.com:8443/window/540359/1000000

What is the expected or desired behavior?

Shall work, please fix. If tough to fix then please add the request with all parms to API as soon the User presses the start button, so that the parms are sent to API before the process starts.

Image: When doing fast as described above, then no request is sent to API after field change: image

ottosichert commented 7 years ago

EDIT 2: See my answer below

~EDIT 1: I tried clicking Start first, then changing fields. This issue is about changing fields first and clicking Start immediately after.~

~@metas-mk I can not reproduce this issue on current master c8079a6ce932b84f796f1bab100d4719f18f93d2 or on https://w101.metasfresh.com:8443/.~

~Trying with throttled network speed yields the same result.~

~The code shows it is working as expected:~

~This is the behaviour I can reproduce~

ottosichert commented 7 years ago

This issue uncovered ~three~ two separate issues:

NOTE: All issues can be reproduced from list view, i.e. https://w101.metasfresh.com:8443/window/540359, provided you select an item

teosarca commented 7 years ago

@ottosichert thanks for the update.

Please also consider this:

If tough to fix then please add the request with all parms to API as soon the User presses the start button, so that the parms are sent to API before the process starts.

(loud thinking) i believe it would make sense to send all params before calling /start anyways, to prevent any weird out of sync params. wdyt?

ottosichert commented 7 years ago

@teosarca First I will resolve issue (1), it should be possible. If issue (2) persists and can be reproduced, I will first look for a fix. If there is no other fix than refactoring <Process>, <MasterWidget> and <RawWidget> altogether, maybe we can look into this workaround.

But I suggest we shouldn't add another workaround there, the code of these components already contains a lot of them

teosarca commented 7 years ago

note: about sending all process parameters, we have a similar case here, but that one is about editable views: https://github.com/metasfresh/metasfresh-webui-frontend/issues/1358