Custom Fields From fixtures on 2 different Apps

Hello,

If there are 2 custom apps installed in the site and both apps have a fixtures file for Custom Field, would the Custom Fields in the site be generated by BOTH apps? Will having 2 fixtures folders cause conflicts on the site? Or will the site only read the custom fields from one app only?

I’m curious if anyone has encountered a scenario wherein a site has 2 apps (aside from frappe & erpnext), both of which has fixtures (eg. Custom Fields, custom scripts).

Regards,
Hera

I have.
And you end up exporting for both apps… And migrating.
Assuming you will make a change in one (tested) now export and migrate the site… Do The same on the other app…
Report names must be different like appA_report1 and appB_report1
I think at the end you will join them as one like Modules as I did with 3 already and now planning to do with the last one.

1 Like

Thanks for the info @Helio_Jesus!

I currently have a site(in a server) which already has existing fixtures (created by a previous developer) unfortunately, the person didn’t leave us with the repository information and we’re still trying to figure out a way to retrieve the app data (probably through the server). So the team is debating on creating a new app and export additional fixtures there and leave the old app untouched.

Would this approach work?

Best would be to copy the old app into a new app & change references wherever necessary & then maintain a new app. If you keep 2 custom apps the custom fields and other details may override each other based whenever you do bench migrate.

Also, send an email to the developer who made the old app to provide his repo information.

2 Likes

Got the best solution thanks for sharing it.

You will get app code from frappe-bench/apps folder in server.

For custom field and custom script fixtures, it works as data import tool.
You need to run bench export-fixtures from server to get latest working code.
If you do bench migrate before exporting the fixtures, then there is might some changes that you will loose, some property setter and custom script will be overridden.

I