To define your logic while importing on top of an existing configuration, you should use configuration tasks. Depending on your need you may want to delete existing screens or ignore if it already exists. Import functionality may skip overwriting some parts not to break an existing setup.
This is exactly what is happening I have updated the parameters by extending what is passed (added a few more) and this is not overwriting. So @emre you are saying this is by design?
I did not know this and it is very important.
Ok somebody help me out here - if I choose not to prefix or suffix rules I would expect they get overwritten with the new rule. That’s works ok it seems, so why would SambaPOS not overwrite screens?
Umm surely I or you Emre have not understood each other as I have imported 2 screens; (1)st just has a new Editor Widget and that worked fine; (2)nd Screen just had the Above “Command Buttons” parameters changed and that failed.
So I am lost to understand the logic and confused.
If you re-read your first post it says it fails to import. I understood it like it does not import so when I saw it imports fine I thought it is just a misunderstanding. Giving all details regarding issue is really important so we can communicate better.
Imports basically created for configuring new systems faster. Overwriting existing setups is something different. I hand typed a different overwrite logic for each importing item. Some of them may overwrite, some of them may not. This is not something random. It follows a logic but it is hard to remember without checking source code that works while importing entity screens. What I was trying to say you are not limited to my import logic if you use configuration tasks and suggested to use it in general.
Now I reviewed source code, imported your config a couple times and found it updates entity screens but just skips overwriting widgets. The reason of it is there is no good way to determine which exported widget corresponds to what existing widget as naming them is not required and uniqueness of them is not checked. Deleting existing widgets and creating imported ones is not a good idea as it will be a destructive import and we generally don’t do it. So if you mean to replace entity screen here it will be the safest to delete existing entity screen and recreate it with import to ensure there is no merging issue. You can do it with configuration tasks.
I can implement something to update named widgets but it is really not a good idea as it may lead to unintended overwrites and may create different issues on different cases.
What I will do going forward is prefix all my incoming UPDATED logic; deleted the old logic and rename the new incoming such as Screens, Rules etc.
What would be good is if I new which objects I need to do this with? For example RULEs seems to overwrite no problems. What confused me is the 2nd screen was overwritten and a NEW widget was added. The issue is when a Widget already exists THEN I assume elements like name, parameters etc are NOT updated (reading above Widget is not updated)?
I have reviewed TASKS and the only information available is from kendash (to me of all people) and I feel due to time constraints I will carefully now manage my updates until I am fully trained on Configuration tasks.
Pauln you will find basic config tasks are simple. yes custom ones can be more involved but you could build a config task the same way you do an import task almost… people are afraid of them but if you spend a fraction of the time you do trying to stretch limits of features you would see just how simple they really are.
Eventually for a large base of Customers YES. At the moment I am fine tuning a few Rules and Widgets for better flow and it is far faster to manager a LIVE system by importing the UPDATE. The reason why I have come to this Thread is I decided NOT to update LIVE but (as always just too anal) decided to test the import.
Did not understand why my shiny new Widget did not perform as expect in the office.
Well if I can speak for all us “average people” that is the first time I have seen “the process” - yes there has been lots of words but that came across as too much to do too little, to coin your fav phrase - “being honest here”.
Now speaking for myself, I try to read every post (I mean EVERY POST) so for some reason I have missed the steps you have shown above. Furthermore looking at the GIF it seems to IMPORT? Will we come up against the same issue as described in this post? Will Tasks overwrite Widgets?