We tried to export employee and roles data using fixtures from one machine to another. The employee data has dependency on user data (Leave Approver is a User), but the system tries to upload Employee first, and fails since it cant find the leave approvers in user data. Is there a way to fix this, or set an order in which the fixtures will be processed?
Please upload the Users first and then upload the employee. Hope this solves the query else please elaborate.
It does solve the problem. I just finished doing it. But this kind of dependency is everywhere - Item & Item Attribute, Supplier & Supplier Contact, Item & Default BOM, Employee & User, Employee & Holiday List - and the list goes on.
Looking for a long term solution - can the fixtures be processed in a specific sequence so that the dependencies are honoured?
@kirthi As per the current design only one file can be imported at the moment. so processing cannot be done. Can you please explain your use case so that we understand the problem better.
I’m doing development in one machine, then move it to testing & then to production. Sometimes, I have to replicate the data setup done in dev, to be exported to testing & then to prod. I export all these data through fixtures (Item, Item Attributes, Employee, User, Warehouses, BOM, etc) from dev and import them in other machines. When I do that, importing fixtures fails because of this dependency. Item.json is processed first before item_attributes.json is processed. employee.json is procvessed first before user.json is prcoessed. It creates dependency error and the import fails.
So, I’m requesting - When the system processes the fixtures, can it ensure that item_attributes are processed first before item is processed. Similarly for other fixtures as well…
Hi, how you have accomplished the feature sequence, please share your solution /experience